예제 #1
0
 def _toggle_and_verify_state(self, final_state):
     Wait(self.marionette).until(expected.element_enabled(
         self.root_element))
     Wait(self.marionette).until(
         lambda m: self.is_checked is not final_state)
     self._toggle()
     Wait(self.marionette).until(lambda m: self.is_checked is final_state)
     Wait(self.marionette).until(expected.element_enabled(
         self.root_element))
예제 #2
0
 def tap_fixed_dialing(self):
     element = self.marionette.find_element(*self._fixed_dialing_numbers_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._fixed_dialing_page_locator))
예제 #3
0
 def confirm_apn_selection(self):
     element = self.marionette.find_element(*self._apn_selector_confirm_button_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._apn_editor_page_locator))
예제 #4
0
파일: header.py 프로젝트: eliperelman/gaia
 def go_back(self):
     Wait(self.marionette).until(expected.element_enabled(self.root_element) and
                                 expected.element_displayed(self.root_element))
     self.marionette.switch_to_shadow_root(self.root_element)
     self.marionette.find_element(*self._back_button_locator).tap()
     self.marionette.switch_to_shadow_root()
     Wait(self.marionette).until(expected.element_not_displayed(self.root_element))
예제 #5
0
 def open_time_format(self):
     self.marionette.find_element(*self._24h_selector_locator).tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(
         expected.element_enabled(
             self.marionette.find_element(
                 *self._time_format_confirm_button_locator)))
예제 #6
0
 def tap_manage_tones_selector(self):
     self.marionette.find_element(*self._manage_tones_selector_locator).tap()
     manage_tones_page = RingTone(self.marionette)
     element = self.marionette.find_element(*self._dulco_ringtone_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     return manage_tones_page
예제 #7
0
파일: cell_data.py 프로젝트: pottierg/gaia
 def enable_roaming(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._data_roaming_enabled_label_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     return self.data_prompt
예제 #8
0
 def tap_alerts_selector(self):
     self.marionette.find_element(*self._alert_selector_locator).tap()
     alerts_page = RingTone(self.marionette)
     element = self.marionette.find_element(*self._firefox_alerts_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     return alerts_page
예제 #9
0
 def tap_auth_numbers(self):
     element = self.marionette.find_element(*self._auth_number_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._auth_number_page_locator))
예제 #10
0
 def tap_call_forwarding(self):
     element = self.marionette.find_element(*self._call_forwarding_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._call_forwarding_page_locator))
예제 #11
0
 def enable_roaming(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._data_roaming_enabled_label_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     return self.data_prompt
예제 #12
0
 def confirm_network_type(self):
     element = self.marionette.find_element(*self._network_type_confirm_button_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._network_type_selector_locator))
예제 #13
0
파일: keypad.py 프로젝트: kuoe0/gaia-dev
 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)
예제 #14
0
 def confirm_apn_selection(self):
     element = self.marionette.find_element(*self._apn_selector_confirm_button_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._apn_editor_page_locator))
예제 #15
0
파일: keypad.py 프로젝트: AaskaShah/gaia
 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)
예제 #16
0
 def confirm_network_type(self):
     element = self.marionette.find_element(*self._network_type_confirm_button_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._network_type_selector_locator))
예제 #17
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)
예제 #18
0
 def tap_sim_1(self):
     element = self.marionette.find_element(*self._sim_1_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._call_settings_page_locator))
예제 #19
0
 def select_roaming_protocol(self):
     element = self.marionette.find_element(*self._roaming_protocol_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(
         *self._apn_selector_confirm_button_locator))
예제 #20
0
 def tap_call_barring_all(self):
     element = self.marionette.find_element(*self._call_barring_all_switch_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._call_barring_all_cancel_button_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
예제 #21
0
 def tap_apn_settings(self):
     element = self.marionette.find_element(*self._apn_settings_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._reset_apn_btn_locator))
예제 #22
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)
예제 #23
0
 def tap_change_passcode(self):
     element = self.marionette.find_element(*self._change_passcode_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._passcode_page_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
예제 #24
0
 def tap_add_new_apn(self):
     element = self.marionette.find_element(*self._add_new_apn_btn_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._apn_editor_page_locator))
예제 #25
0
    def tap_caller_id_selection(self):
        menu_item = self.marionette.find_element(*self._caller_id_menu_item_locator)
        Wait(self.marionette).until(lambda m: not menu_item.get_attribute("aria-disabled"))

        element = self.marionette.find_element(*self._caller_id_selector_locator)
        Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
        element.tap()
        self.marionette.switch_to_frame()
예제 #26
0
 def tap_network_operator(self):
     element = self.marionette.find_element(*self._network_op_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._network_type_selector_locator))
예제 #27
0
 def tap_forward_unanswered(self):
     element = self.marionette.find_element(*self._call_forwarding_unanswered_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._call_forwarding_unanswered_page_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
예제 #28
0
 def go_back_and_exit(self, app=None, add_statusbar_height=True):
     Wait(self.marionette).until(
         expected.element_enabled(self.root_element)
         and expected.element_displayed(self.root_element))
     self.tap_element_from_system_app(
         self.root_element, add_statusbar_height=add_statusbar_height, x=20)
     app.wait_to_not_be_displayed()
     self.apps.switch_to_displayed_app()
예제 #29
0
 def tap_voicemail(self):
     element = self.marionette.find_element(*self._voicemail_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._voicemail_number_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
예제 #30
0
 def select_roaming_protocol(self):
     element = self.marionette.find_element(*self._roaming_protocol_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(
         *self._apn_selector_confirm_button_locator))
예제 #31
0
    def tap_sim_1(self):
        element = self.marionette.find_element(*self._sim_1_locator)
        Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
        element.tap()
        Wait(self.marionette).until(expected.element_displayed(*self._call_settings_page_locator))

        menu_item = self.marionette.find_element(*self._caller_id_menu_item_locator)
        Wait(self.marionette, timeout=120).until(lambda m: not menu_item.get_attribute("aria-disabled"))
예제 #32
0
 def tap_caller_id_selection(self):
     element = self.marionette.find_element(
         *self._caller_id_selector_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     self.marionette.switch_to_frame()
예제 #33
0
파일: app.py 프로젝트: nitral/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)
예제 #34
0
파일: app.py 프로젝트: zhannett/gaia
    def tap_select_button(self):
        select = self.marionette.find_element(*self._select_button_locator)
        Wait(self.marionette).until(expected.element_enabled(select))
        self.tap_element_from_system_app(select)

        # 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()
예제 #35
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))
예제 #36
0
 def tap_call_forwarding(self):
     element = self.marionette.find_element(*self._call_forwarding_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._call_forwarding_page_locator))
예제 #37
0
 def tap_sim_1(self):
     element = self.marionette.find_element(*self._sim_1_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._call_settings_page_locator))
예제 #38
0
 def tap_auth_numbers(self):
     element = self.marionette.find_element(*self._auth_number_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._auth_number_page_locator))
예제 #39
0
 def tap_data_settings(self):
     element = self.marionette.find_element(*self._data_settings_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._add_new_apn_btn_locator))
     # also necessary to check for selections, since sometimes the button gets displayed first
     Wait(self.marionette).until(expected.element_displayed(*self._apn_item_locator))
예제 #40
0
파일: app.py 프로젝트: Anirudh0/gaia
 def tap_next(self):
     next_button = Wait(self.marionette).until(
         expected.element_present(*self._next_button_locator))
     Wait(self.marionette).until(expected.element_displayed(next_button))
     Wait(self.marionette).until(expected.element_enabled(next_button))
     # In b2g desktop builds, this sleep prevents intermittent failures
     time.sleep(0.2)
     next_button.tap()
예제 #41
0
 def tap_next(self):
     next_button = Wait(self.marionette).until(
         expected.element_present(*self._next_button_locator))
     Wait(self.marionette).until(expected.element_displayed(next_button))
     Wait(self.marionette).until(expected.element_enabled(next_button))
     # In b2g desktop builds, this sleep prevents intermittent failures
     time.sleep(0.2)
     next_button.tap()
예제 #42
0
파일: gmail.py 프로젝트: AaskaShah/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)
예제 #43
0
    def tap_cancel_reset(self):
        dialog_view = self.marionette.find_element(*self._reset_apn_page_locator)
        element = self.marionette.find_element(*self._cancel_btn_locator)
        Wait(self.marionette).until(expected.element_displayed(element) and
                                    expected.element_enabled(element))
        element.tap()

        Wait(self.marionette).until(lambda m: 'current' not in dialog_view.get_attribute('class'))
        Wait(self.marionette).until(expected.element_displayed(*self._reset_apn_btn_locator))
예제 #44
0
 def tap_call_barring_all_cancel(self):
     element = self.marionette.find_element(
         *self._call_barring_all_cancel_button_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._call_barring_page_locator))
예제 #45
0
파일: new_message.py 프로젝트: uniony/gaia
 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)
예제 #46
0
    def tap_cancel_reset(self):
        dialog_view = self.marionette.find_element(*self._reset_apn_page_locator)
        element = self.marionette.find_element(*self._cancel_btn_locator)
        Wait(self.marionette).until(expected.element_displayed(element) and
                                    expected.element_enabled(element))
        element.tap()

        Wait(self.marionette).until(lambda m: 'current' not in dialog_view.get_attribute('class'))
        Wait(self.marionette).until(expected.element_displayed(*self._reset_apn_btn_locator))
예제 #47
0
 def tap_fixed_dialing(self):
     element = self.marionette.find_element(
         *self._fixed_dialing_numbers_locator)
     Wait(self.marionette).until(
         expected.element_displayed(element)
         and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._fixed_dialing_page_locator))
예제 #48
0
 def go_back(self):
     Wait(self.marionette).until(
         expected.element_enabled(self.root_element)
         and expected.element_displayed(self.root_element))
     self.marionette.switch_to_shadow_root(self.root_element)
     self.marionette.find_element(*self._back_button_locator).tap()
     self.marionette.switch_to_shadow_root()
     Wait(self.marionette).until(
         expected.element_not_displayed(self.root_element))
예제 #49
0
 def go_back(self):
     back_button = self.root_element.find_element(
         *self._back_button_locator)
     Wait(self.marionette).until(
         expected.element_enabled(back_button)
         and expected.element_displayed(back_button))
     back_button.tap()
     Wait(self.marionette).until(
         expected.element_not_displayed(back_button))
예제 #50
0
파일: app.py 프로젝트: mwargers/MTBF-Driver
 def tap_rename_my_device(self):
     _rename_my_device_button_locator = (By.CSS_SELECTOR, 'button.rename-device')
     _update_device_name_input_locator = (By.CSS_SELECTOR, 'input.settings-dialog-input')
     Wait(self.marionette, timeout=120).until(
         expected.element_displayed(*_rename_my_device_button_locator))
     rename_my_device_button = self.marionette.find_element(*_rename_my_device_button_locator)
     Wait(self.marionette).until(expected.element_enabled(rename_my_device_button))
     rename_my_device_button.tap()
     Wait(self.marionette, timeout=120).until(
         expected.element_displayed(*_update_device_name_input_locator))
예제 #51
0
파일: crop_view.py 프로젝트: AaskaShah/gaia
 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))
예제 #52
0
 def enable_fixed_dialing(self):
     element = self.marionette.find_element(*self._toggle_fixed_dialing_number_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._sim_pin_area_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
예제 #53
0
 def tap_rename_my_device(self):
     _rename_my_device_button_locator = (By.CSS_SELECTOR, 'button.rename-device')
     _update_device_name_input_locator = (By.CSS_SELECTOR, 'input.settings-dialog-input')
     Wait(self.marionette, timeout=120).until(
         expected.element_displayed(*_rename_my_device_button_locator))
     rename_my_device_button = self.marionette.find_element(*_rename_my_device_button_locator)
     Wait(self.marionette).until(expected.element_enabled(rename_my_device_button))
     rename_my_device_button.tap()
     Wait(self.marionette, timeout=120).until(
         expected.element_displayed(*_update_device_name_input_locator))
예제 #54
0
파일: header.py 프로젝트: vrubiolo/gaia
 def go_back(self):
     Wait(self.marionette).until(expected.element_enabled(self.root_element) and
                                 expected.element_displayed(self.root_element))
     self.marionette.switch_to_shadow_root(self.root_element)
     element = self.marionette.find_element(*self._back_button_locator)
     if element.is_displayed():
         element.tap()
         self.marionette.switch_to_shadow_root()
     else: # This header has a close button instead of a back button
         self.marionette.switch_to_shadow_root()
         self.root_element.find_element(*self._close_button_locator).tap()
     Wait(self.marionette).until(expected.element_not_displayed(self.root_element))
예제 #55
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, NoSuchWindowException):
            # 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()
예제 #56
0
파일: app.py 프로젝트: AaskaShah/gaia
    def tap_select_button(self):
        select = self.marionette.find_element(*self._select_button_locator)
        Wait(self.marionette).until(expected.element_enabled(select))

        # Workaround for bug 1109213, where tapping on the button inside the app itself
        # makes Marionette spew out NoSuchWindowException errors
        x = select.rect['x'] + select.rect['width']//2
        y = select.rect['y'] + select.rect['height']//2
        self.marionette.switch_to_frame()
        self.marionette.find_element(*self._screen_locator).tap(x, y)

        # 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()
예제 #57
0
파일: app.py 프로젝트: ruvsmirnov/gaia
    def return_to_prev_menu(self, parent_view, exit_view, back_button = None):

        # TODO: remove tap with coordinates after Bug 1061698 is fixed
        if back_button is None:
            # because of th Bug 1061698, we need to locate the
            # right edge of the header and tap it
            # if we have the back_button, then tapping anywhere
            # within it should give the same result
            back_button = self.marionette.find_element(*self._header_locator)

        Wait(self.marionette).until(expected.element_enabled(back_button) and
                                    expected.element_displayed(back_button))
        back_button.tap(25, 25)

        Wait(self.marionette).until(lambda m: 'current' not in exit_view.get_attribute('class'))
        Wait(self.marionette).until(lambda m: parent_view.rect['x'] == 0)
        Wait(self.marionette).until(lambda m: 'current' in parent_view.get_attribute('class'))