From Thundering Hog, 1 Week ago, written in Text.
Embed
  1. from marionette import Marionette
  2. from marionette_driver.by import By
  3. from gaiatest.apps.camera.app import Camera
  4. from gaiatest.apps.camera.regions.options import CameraOptionMenu
  5. import time
  6.  
  7. marionette = Marionette(port=2828)
  8. marionette.start_session()
  9. camera = Camera(marionette)
  10. print 'camera launch'
  11. camera.launch()
  12. print 'Record video'
  13. camera.sfp_keypad.press_dpad_right_button()
  14. time.sleep(2)
  15. camera.sfp_keypad.press_ok_button()
  16. time.sleep(30)
  17. print 'stop the video'
  18. camera.sfp_keypad.press_ok_button()
  19. time.sleep(2)
  20. print 'play the video'
  21. camera.sfp_keypad.press_softkey_left_button()
  22. camera.sfp_keypad.press_ok_button()
  23. time.sleep(30)
  24. print 'delete the video'
  25. camera.sfp_keypad.press_softkey_right_button()
  26. camera.sfp_keypad.press_dpad_down_button()
  27. camera.sfp_keypad.press_ok_button()
  28. for _ in range(3):
  29.     camera.sfp_keypad.press_endcall_button()
  30. marionette.delete_session()
  31.