Example #1
0
 def tap_call_button(self, switch_to_call_screen=True):
     element = Wait(self.marionette).until(
         expected.element_present(*self._call_bar_locator))
     Wait(self.marionette).until(expected.element_enabled(element))
     element.tap()
     if switch_to_call_screen:
         return CallScreen(self.marionette)
Example #2
0
 def tap_select_button(self):
     select = self.marionette.find_element(*self._select_button_locator)
     Wait(self.marionette).until(expected.element_enabled(select))
     select.tap()
     # Fall back to app beneath the picker
     Wait(self.mariontte).until(lambda m: self.apps.displayed_app.name != self.name)
     self.apps.switch_to_displayed_app()
Example #3
0
 def tap_select_button(self):
     select = self.marionette.find_element(*self._select_button_locator)
     Wait(self.marionette).until(expected.element_enabled(select))
     select.tap()
     # Fall back to app beneath the picker
     Wait(self.marionette).until(lambda m: self.apps.displayed_app.name != self.name)
     self.apps.switch_to_displayed_app()
Example #4
0
 def tap_select_all(self):
     # TODO replace this with proper tap when Bug 932804 is resolved
     self.marionette.execute_script(
         'window.wrappedJSObject.importer.ui.selectAll();',
         special_powers=True)
     el = self.marionette.find_element(*self._import_button_locator)
     Wait(self.marionette).until(expected.element_enabled(el))
Example #5
0
 def tap_call_button(self, switch_to_call_screen=True):
     element = Wait(self.marionette).until(
         expected.element_present(*self._call_bar_locator))
     Wait(self.marionette).until(expected.element_enabled(element))
     element.tap()
     if switch_to_call_screen:
         return CallScreen(self.marionette)
Example #6
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._crop_view_locator))))
     done = self.marionette.find_element(*self._crop_done_button_locator)
     Wait(self.marionette).until(expected.element_enabled(done))
Example #7
0
 def tap_send(self, timeout=120):
     send = Wait(self.marionette).until(
         expected.element_present(*self._send_message_button_locator))
     Wait(self.marionette).until(expected.element_enabled(send))
     send.tap()
     self.wait_for_element_not_present(*self._message_sending_locator, timeout=timeout)
     from gaiatest.apps.messages.regions.message_thread import MessageThread
     return MessageThread(self.marionette)
Example #8
0
 def tap_toggle_flash_button(self):
     initial_flash_mode = self.current_flash_mode
     toggle = self.marionette.find_element(
         *self._toggle_flash_button_locator)
     Wait(self.marionette).until(expected.element_enabled(toggle))
     toggle.tap()
     Wait(self.marionette).until(
         lambda m: self.current_flash_mode != initial_flash_mode)
Example #9
0
 def tap_send(self, timeout=120):
     send = Wait(self.marionette).until(
         expected.element_present(*self._send_message_button_locator))
     Wait(self.marionette).until(expected.element_enabled(send))
     send.tap()
     self.wait_for_element_not_present(*self._message_sending_locator, timeout=timeout)
     from gaiatest.apps.messages.regions.message_thread import MessageThread
     return MessageThread(self.marionette)
Example #10
0
 def enable_bluetooth(self):
     self.marionette.find_element(*self._bluetooth_label_locator).tap()
     checkbox = self.marionette.find_element(
         *self._bluetooth_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
     rename_device = self.marionette.find_element(
         *self._rename_my_device_button_locator)
     Wait(self.marionette).until(expected.element_enabled(rename_device))
Example #11
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(
             Wait(self.marionette).until(
                 expected.element_present(*self._crop_view_locator))))
     done = self.marionette.find_element(*self._crop_done_button_locator)
     Wait(self.marionette).until(expected.element_enabled(done))
Example #12
0
File: gmail.py Project: 6a68/gaia
 def tap_grant_access(self):
     grant_access = self.marionette.find_element(*self._grant_access_button_locator)
     Wait(self.marionette).until(expected.element_enabled(grant_access))
     grant_access.tap()
     # Go back to displayed Contacts app before waiting for the picker
     Wait(self.marionette).until(lambda m: self.apps.displayed_app.name == 'Contacts')
     self.apps.switch_to_displayed_app()
     from gaiatest.apps.contacts.regions.contact_import_picker import ContactImportPicker
     return ContactImportPicker(self.marionette)
Example #13
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._edit_preview_canvas_locator))))
     # I have tried waiting for all the elements in the UI, but the crash
     # still occurs so the only solution I found was the hardcoded sleep - Bug 1111981
     time.sleep(3)
     done = self.marionette.find_element(*self._crop_done_button_locator)
     Wait(self.marionette).until(expected.element_enabled(done))
Example #14
0
 def tap_reset_button(self):
     button = Wait(self.marionette).until(
         expected.element_present(*self._reset_pin_button_locator))
     Wait(self.marionette).until(expected.element_displayed(button))
     Wait(self.marionette).until(expected.element_enabled(button))
     # This workaround is required for gaia v2.0, but can be removed in later versions
     # as the bug has been fixed
     # Bug 937053 - tap() method should calculate elementInView from the coordinates of the tap
     self.marionette.execute_script('arguments[0].scrollIntoView(false);', [button])
     button.tap()
Example #15
0
 def tap_grant_access(self):
     grant_access = self.marionette.find_element(
         *self._grant_access_button_locator)
     Wait(self.marionette).until(expected.element_enabled(grant_access))
     grant_access.tap()
     # Go back to displayed Contacts app before waiting for the picker
     Wait(self.marionette).until(
         lambda m: self.apps.displayed_app.name == 'Contacts')
     self.apps.switch_to_displayed_app()
     from gaiatest.apps.contacts.regions.contact_import_picker import ContactImportPicker
     return ContactImportPicker(self.marionette)
Example #16
0
 def __init__(self, marionette):
     Base.__init__(self, marionette)
     Wait(self.marionette).until(
         expected.element_displayed(
             Wait(self.marionette).until(
                 expected.element_present(
                     *self._edit_preview_canvas_locator))))
     # I have tried waiting for all the elements in the UI, but the crash
     # still occurs so the only solution I found was the hardcoded sleep - Bug 1111981
     time.sleep(3)
     done = self.marionette.find_element(*self._crop_done_button_locator)
     Wait(self.marionette).until(expected.element_enabled(done))
Example #17
0
    def tap_select_button(self):
        select = self.marionette.find_element(*self._select_button_locator)
        Wait(self.marionette).until(expected.element_enabled(select))

        try:
            select.tap()
        except FrameSendFailureError:
            # The frame may close for Marionette but that's expected so we can continue - Bug 1065933
            pass

        # Fall back to app beneath the picker
        Wait(self.marionette).until(lambda m: self.apps.displayed_app.name != self.name)
        self.apps.switch_to_displayed_app()
Example #18
0
File: app.py Project: AlexSJ/gaia
    def tap_select_button(self):
        select = self.marionette.find_element(*self._select_button_locator)
        Wait(self.marionette).until(expected.element_enabled(select))

        try:
            select.tap()
        except FrameSendFailureError:
            # The frame may close for Marionette but that's expected so we can continue - Bug 1065933
            pass

        # Fall back to app beneath the picker
        Wait(self.marionette).until(lambda m: self.apps.displayed_app.name != self.name)
        self.apps.switch_to_displayed_app()
Example #19
0
File: app.py Project: guhelski/gaia
 def tap_next(self):
     next_button = Wait(self.marionette).until(
         expected.element_present(*self._next_button_locator))
     Wait(self.marionette).until(expected.element_enabled(next_button))
     next_button.tap()
Example #20
0
 def enable_bluetooth(self):
     self.marionette.find_element(*self._bluetooth_label_locator).tap()
     checkbox = self.marionette.find_element(*self._bluetooth_checkbox_locator)
     Wait(self.marionette).until(expected.element_selected(checkbox))
     rename_device = self.marionette.find_element(*self._rename_my_device_button_locator)
     Wait(self.marionette).until(expected.element_enabled(rename_device))
Example #21
0
 def _wait_for_toggle_ready(self, by, locator):
     checkbox = self.marionette.find_element(by, locator)
     Wait(self.marionette).until(expected.element_enabled(checkbox))
Example #22
0
 def tap_approve_access(self):
     approve_access = Wait(self.marionette).until(
         expected.element_present(*self._approve_access_locator))
     Wait(self.marionette).until(expected.element_enabled(approve_access))
     approve_access.tap()
Example #23
0
 def tap_take_tour(self):
     take_tour = Wait(self.marionette).until(
         expected.element_present(*self._take_tour_button_locator))
     Wait(self.marionette).until(expected.element_displayed(take_tour))
     Wait(self.marionette).until(expected.element_enabled(take_tour))
     take_tour.tap()
Example #24
0
 def wait_for_phone_number_ready(self):
     # entering dialer and expecting a phone number there is javascript that
     # sets the phone value and enables this button
     add_contact = self.marionette.find_element(
         *self._add_new_contact_button_locator)
     Wait(self.marionette).until(expected.element_enabled(add_contact))
Example #25
0
 def tap_capture(self):
     capture_button = self.marionette.find_element(*self._capture_button_locator)
     Wait(self.marionette).until(expected.element_enabled(capture_button))
     capture_button.tap()
Example #26
0
 def tap_phone_number(self):
     call = self.marionette.find_element(*self._call_phone_number_button_locator)
     Wait(self.marionette).until(expected.element_enabled(call))
     call.tap()
     from gaiatest.apps.phone.regions.call_screen import CallScreen
     return CallScreen(self.marionette)
Example #27
0
 def wait_for_phone_number_ready(self):
     # entering dialer and expecting a phone number there is javascript that
     # sets the phone value and enables this button
     add_contact = self.marionette.find_element(
         *self._add_new_contact_button_locator)
     Wait(self.marionette).until(expected.element_enabled(add_contact))
Example #28
0
 def tap_pin_continue(self):
     button = Wait(self.marionette).until(
         expected.element_present(*self._pin_continue_button_locator))
     Wait(self.marionette).until(expected.element_displayed(button))
     Wait(self.marionette).until(expected.element_enabled(button))
     button.tap()
 def tap_select_all(self):
     # TODO replace this with proper tap when Bug 932804 is resolved
     self.marionette.execute_script('window.wrappedJSObject.importer.ui.selectAll();', special_powers=True)
     el = self.marionette.find_element(*self._import_button_locator)
     Wait(self.marionette).until(expected.element_enabled(el))
Example #30
0
 def wait_for_update_button_enabled(self):
     update = self.marionette.find_element(*self._update_locator)
     Wait(self.marionette).until(expected.element_enabled(update))
Example #31
0
File: app.py Project: AlexSJ/gaia
 def tap_toggle_flash_button(self):
     initial_flash_mode = self.current_flash_mode
     toggle = self.marionette.find_element(*self._toggle_flash_button_locator)
     Wait(self.marionette).until(expected.element_enabled(toggle))
     toggle.tap()
     Wait(self.marionette).until(lambda m: self.current_flash_mode != initial_flash_mode)
Example #32
0
 def tap_next(self):
     next_button = Wait(self.marionette).until(
         expected.element_present(*self._next_button_locator))
     Wait(self.marionette).until(expected.element_enabled(next_button))
     next_button.tap()
Example #33
0
File: app.py Project: empoalp/gaia
 def tap_subject(self):
     subject = self.root_element.find_element(*self._subject_locator)
     Wait(self.marionette).until(expected.element_enabled(subject))
     subject.tap()
     from gaiatest.apps.email.regions.read_email import ReadEmail
     return ReadEmail(self.marionette)
Example #34
0
 def tap_tour_next(self):
     next = Wait(self.marionette).until(
         expected.element_present(*self._tour_next_button_locator))
     Wait(self.marionette).until(expected.element_displayed(next))
     Wait(self.marionette).until(expected.element_enabled(next))
     next.tap()
Example #35
0
File: google.py Project: 6a68/gaia
 def tap_approve_access(self):
     approve_access = Wait(self.marionette).until(
         expected.element_present(*self._approve_access_locator))
     Wait(self.marionette).until(expected.element_enabled(approve_access))
     approve_access.tap()
Example #36
0
 def tap_subject(self):
     subject = self.root_element.find_element(*self._subject_locator)
     Wait(self.marionette).until(expected.element_enabled(subject))
     subject.tap()
     from gaiatest.apps.email.regions.read_email import ReadEmail
     return ReadEmail(self.marionette)
Example #37
0
 def _wait_for_toggle_ready(self, by, locator):
     checkbox = self.marionette.find_element(by, locator)
     Wait(self.marionette).until(expected.element_enabled(checkbox))