Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tap_camera(self):
actions_menu = Wait(self.marionette).until(
expected.element_present(*self._actions_menu_locator))
Wait(self.marionette).until(
expected.element_displayed(actions_menu))
self.marionette.find_element(*self._camera_button_locator).tap()
Wait(self.marionette).until(
expected.element_not_displayed(actions_menu))
from gaiatest.apps.camera.app import Camera
camera = Camera(self.marionette)
camera.wait_to_be_displayed()
self.apps.switch_to_displayed_app()
camera.wait_for_capture_ready()
return camera
def switch_to_camera(self):
switch_to_camera_button = self.marionette.find_element(*self._switch_to_camera_button_locator)
switch_to_camera_button.tap()
camera_app = gaiatest.apps.camera.app.Camera(self.marionette)
Wait(self.marionette).until(lambda m: self.apps.displayed_app.name == camera_app.name)
self.apps.switch_to_displayed_app()
return camera_app
def unlock_to_camera(self):
Wait(self.marionette).until(expected.element_displayed(*self._lockscreen_handle_locator))
self._slide_to_unlock('camera')
return Camera(self.marionette)
def tap_switch_to_camera(self):
self.marionette.find_element(*self._camera_locator).tap()
from gaiatest.apps.camera.app import Camera
camera_app = Camera(self.marionette)
camera_app.wait_to_be_displayed()
self.apps.switch_to_displayed_app()
camera_app.wait_for_capture_ready()
Wait(self.marionette).until(expected.element_not_displayed(*self._loading_screen_locator))
return camera_app
def a11y_click_camera_button(self):
self.accessibility.click(self.marionette.find_element(*self._camera_button_locator))
return Camera(self.marionette)
def tap_camera(self):
self.marionette.find_element(*self._camera_button_locator).tap()
from gaiatest.apps.camera.app import Camera
camera = Camera(self.marionette)
camera.switch_to_camera_frame()
return camera