コード例 #1
0
ファイル: settings_form.py プロジェクト: AaskaShah/gaia
 def tap_delete_contacts(self):
     delete_contacts = Wait(self.marionette).until(
         expected.element_present(*self._delete_contacts_locator))
     Wait(self.marionette).until(expected.element_displayed(delete_contacts))
     delete_contacts.tap()
     select_contacts = self.marionette.find_element(*self._select_contacts_locator)
     Wait(self.marionette).until(lambda m: select_contacts.location['y'] == 0)
コード例 #2
0
ファイル: settings_form.py プロジェクト: behappycc/b2g-monkey
 def tap_order_by_last_name(self):
     last_name = Wait(self.marionette).until(
         expected.element_present(*self._order_by_last_name_switch_locator))
     Wait(self.marionette).until(expected.element_displayed(last_name))
     initial_state = self.is_custom_element_checked(last_name)
     last_name.tap()
     self.wait_for_custom_element_checked_state(last_name, checked=not(initial_state))
コード例 #3
0
ファイル: settings.py プロジェクト: behappycc/b2g-monkey
 def tap_done(self):
     done_button = Wait(self.marionette).until(
         expected.element_present(*self._done_button_locator))
     Wait(self.marionette).until(expected.element_displayed(done_button))
     done_button.tap()
     # Switch back to Cost Control app frame
     self.apps.switch_to_displayed_app()
コード例 #4
0
ファイル: app.py プロジェクト: AaskaShah/gaia
 def tap_back_button(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._test_panel_header_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     # TODO: remove tap with coordinates after Bug 1061698 is fixed
     element.tap(25, 25)
     Wait(self.marionette).until(expected.element_not_displayed(element))
コード例 #5
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
コード例 #6
0
ファイル: screen_lock.py プロジェクト: DouglasSherk/gaia
 def enable_passcode_lock(self):
     checkbox = Wait(self.marionette).until(
         expected.element_present(*self._passcode_checkbox_locator))
     Wait(self.marionette).until(expected.element_displayed(checkbox))
     checkbox.tap()
     section = self.marionette.find_element(*self._screen_lock_passcode_section_locator)
     Wait(self.marionette).until(lambda m: section.location['x'] == 0)
コード例 #7
0
 def tap_settings(self):
     settings = Wait(self.marionette).until(
         expected.element_present(*self._settings_button_locator))
     Wait(self.marionette).until(expected.element_displayed(settings))
     settings.tap()
     from gaiatest.apps.cost_control.regions.settings import Settings
     return Settings(self.marionette)
コード例 #8
0
 def disable_geolocation(self):
     element = Wait(self.marionette).until(
         expected.element_present(
             *self._enable_geolocation_checkbox_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     # TODO: Remove y parameter when Bug 932804 is fixed
     element.tap(y=30)
コード例 #9
0
    def test_post_camera_preview(self):

        lock_screen = LockScreen(self.marionette)
        homescreen = lock_screen.unlock()

        # Turn off the geolocation prompt, and then launch the camera app
        self.apps.set_permission('Camera', 'geolocation', 'deny')
        self.camera = Camera(self.marionette)
        self.camera.launch()
        while (self.camera.current_flash_mode != 'off'):
            self.camera.tap_toggle_flash_button()
        time.sleep(2)
        self.marionette.switch_to_frame()
        camera_frame = Wait(self.marionette, timeout=120).until(
            expected.element_present(*self._camera_frame_locator))
        camera_frame.tap()
        self.marionette.switch_to_frame(camera_frame)
        time.sleep(20)
        self.device.touch_home_button()
        time.sleep(10)
        self.device.turn_screen_off()

        print ""
        print "Running Post Camera Preview Test"
        self.runPowerTest("post_idle_camera_preview", "Camera", "camera")
コード例 #10
0
ファイル: screen_lock.py プロジェクト: zeromars/gaia
 def enable_passcode_lock(self):
     checkbox = Wait(self.marionette).until(
         expected.element_present(*self._passcode_checkbox_locator))
     Wait(self.marionette).until(expected.element_displayed(checkbox))
     checkbox.tap()
     section = self.marionette.find_element(*self._screen_lock_passcode_section_locator)
     Wait(self.marionette).until(lambda m: section.location['x'] == 0)
コード例 #11
0
ファイル: test_camera.py プロジェクト: JonHylands/power-tests
    def test_camera_picture(self):
        """https://moztrap.mozilla.org/manage/case/1296/"""

        lock_screen = LockScreen(self.marionette)
        homescreen = lock_screen.unlock()

        #self.wait_for_condition(lambda m: self.apps.displayed_app.name == homescreen.name)

        # Turn off the geolocation prompt, and then launch the camera app
        self.apps.set_permission('Camera', 'geolocation', 'deny')
        self.camera = Camera(self.marionette)
        self.camera.launch()
        while (self.camera.current_flash_mode != 'off'):
            self.camera.tap_toggle_flash_button()
        time.sleep(2)
        self.marionette.switch_to_frame()
        camera_frame = Wait(self.marionette, timeout=120).until(
            expected.element_present(*self._camera_frame_locator))
        camera_frame.tap()
        self.marionette.switch_to_frame(camera_frame)

        print ""
        print "Running Camera Picture Test"
        self.runPowerTest("camera_picture", "Camera", "camera",
                          PICTURE_INTERVAL_TIME, self.take_picture)
コード例 #12
0
 def tap_back_button(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._test_panel_header_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     # TODO: remove tap with coordinates after Bug 1061698 is fixed
     element.tap(25, 25)
     Wait(self.marionette).until(expected.element_not_displayed(element))
コード例 #13
0
 def select_sim(self, sim):
     locators = [self._menuItem_carrier_sim1_locator,
                 self._menuItem_carrier_sim2_locator]
     element = Wait(self.marionette).until(
         expected.element_present(*locators[sim]))
     Wait(self.marionette).until(expected.element_dispayed(element))
     element.tap()
コード例 #14
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)
コード例 #15
0
 def tap_send_feedback(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._send_feedback_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     Wait(self.marionette).until(
         expected.element_displayed(*self._feedback_choice_locator))
コード例 #16
0
ファイル: app.py プロジェクト: nitral/gaia
 def delete_file(self):
     self.tap_options()
     self.marionette.find_element(*self._delete_button_locator).tap()
     element = Wait(self.marionette).until(
         expected.element_present(*self._confirm_delete_button))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
コード例 #17
0
 def tap_share_button(self):
     share_button = Wait(self.marionette).until(
         expected.element_present(*self._share_thumbnail_locator))
     Wait(self.marionette).until(expected.element_displayed(share_button))
     share_button.tap()
     from gaiatest.apps.system.regions.activities import Activities
     return Activities(self.marionette)
コード例 #18
0
ファイル: sublist_view.py プロジェクト: inni1115/gaia
 def tap_first_song(self):
     self.switch_to_active_view()
     song = Wait(self.marionette).until(
         expected.element_present(*self._first_song_locator))
     song.tap()
     self.apps.switch_to_displayed_app()
     return PlayerView(self.marionette)
コード例 #19
0
ファイル: contact_details.py プロジェクト: DouglasSherk/gaia
 def tap_edit(self):
     edit = Wait(self.marionette).until(expected.element_present(
         *self._edit_contact_button_locator))
     Wait(self.marionette).until(expected.element_displayed(edit))
     edit.tap()
     from gaiatest.apps.contacts.regions.contact_form import EditContact
     return EditContact(self.marionette)
コード例 #20
0
ファイル: app.py プロジェクト: uniony/gaia
 def tap_first_predictive_word(self):
     self.switch_to_keyboard()
     key = Wait(self.marionette).until(
         expected.element_present(*self._predicted_word_locator))
     Wait(self.marionette).until(expected.element_displayed(key))
     key.tap()
     self.apps.switch_to_displayed_app()
コード例 #21
0
 def tap_done(self):
     done = Wait(self.marionette, timeout=60).until(
         expected.element_present(*self._done_locator))
     Wait(self.marionette).until(expected.element_displayed(done))
     done.tap()
     #Switch back to the settings app
     self.apps.switch_to_displayed_app()
コード例 #22
0
ファイル: search_panel.py プロジェクト: uniony/gaia
 def confirm_suggestion_notice(self):
     confirm = Wait(self.marionette).until(
         expected.element_present(
             *self._search_suggestion_ok_button_locator))
     Wait(self.marionette).until(expected.element_displayed(confirm))
     confirm.tap()
     Wait(self.marionette).until(expected.element_not_displayed(confirm))
コード例 #23
0
 def open_change_home_screen(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._change_homescreen_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     new_page = self.marionette.find_element(*self._change_homescreen_page_locator)
     Wait(self.marionette).until(lambda m: new_page.rect['x'] == 0 and new_page.is_displayed())
コード例 #24
0
ファイル: browser.py プロジェクト: AaskaShah/gaia
 def tap_share_to_messages(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._share_to_messages_button_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     from gaiatest.apps.messages.regions.new_message import NewMessage
     return NewMessage(self.marionette)
コード例 #25
0
 def open_get_more_home_screen(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._get_more_homescreen_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(*self._pick_cancel_button_locator))
コード例 #26
0
ファイル: settings_form.py プロジェクト: AaskaShah/gaia
 def tap_export_to_sim(self):
     export_to_sim = Wait(self.marionette).until(
         expected.element_present(*self._export_to_sim_button_locator))
     Wait(self.marionette).until(expected.element_displayed(export_to_sim))
     export_to_sim.tap()
     select_contacts = self.marionette.find_element(*self._select_contacts_locator)
     Wait(self.marionette).until(lambda m: select_contacts.location['y'] == 0)
コード例 #27
0
ファイル: edit_photo.py プロジェクト: kuoe0/gaia-dev
 def tap_portrait_crop(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._crop_portrait_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     Wait(self.marionette).until(
         lambda m: 'selected' in element.get_attribute('class'))
コード例 #28
0
 def select_change_icon_layout(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._change_icon_layout_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(*self._confirm_layout_button_locator))
コード例 #29
0
    def test_post_camera_preview(self):

        lock_screen = LockScreen(self.marionette)
        homescreen = lock_screen.unlock()

        # Turn off the geolocation prompt, and then launch the camera app
        self.apps.set_permission('Camera', 'geolocation', 'deny')
        self.camera = Camera(self.marionette)
        self.camera.launch()
        while (self.camera.current_flash_mode != 'off'):
            self.camera.tap_toggle_flash_button();
        time.sleep(2)
        self.marionette.switch_to_frame()        
        camera_frame = Wait(self.marionette, timeout=120).until(
            expected.element_present(*self._camera_frame_locator))
        camera_frame.tap()
        self.marionette.switch_to_frame(camera_frame)
        time.sleep(20)
        self.device.touch_home_button()
        time.sleep(10)
        self.device.turn_screen_off()

        print ""
        print "Running Post Camera Preview Test"
        self.runPowerTest("post_idle_camera_preview", "Camera", "camera")
コード例 #30
0
ファイル: test_camera.py プロジェクト: JonHylands/power-tests
    def test_camera_video(self):
        """https://moztrap.mozilla.org/manage/case/1296/"""

        lock_screen = LockScreen(self.marionette)
        homescreen = lock_screen.unlock()

        #self.wait_for_condition(lambda m: self.apps.displayed_app.name == homescreen.name)

        # Turn off the geolocation prompt, and then launch the camera app
        self.apps.set_permission('Camera', 'geolocation', 'deny')
        self.camera = Camera(self.marionette)
        self.camera.launch()
        while (self.camera.current_flash_mode != 'off'):
            self.camera.tap_toggle_flash_button();
        time.sleep(2)
        time.sleep(5)
        self.camera.tap_switch_source()
        time.sleep(5)
        self.marionette.switch_to_frame()
        camera_frame = Wait(self.marionette, timeout=120).until(
            expected.element_present(*self._camera_frame_locator))
        camera_frame.tap()
        self.marionette.switch_to_frame(camera_frame)
        self.camera.tap_capture()

        print ""
        print "Running Camera Video Test"
        self.runPowerTest("camera_video", "Camera", "camera")
        self.camera.tap_capture()
コード例 #31
0
ファイル: fxaccounts.py プロジェクト: AaskaShah/gaia
 def tap_done(self):
     done = Wait(self.marionette, timeout=60).until(
         expected.element_present(*self._done_locator))
     Wait(self.marionette).until(expected.element_displayed(done))
     done.tap()
     #Switch back to the settings app
     self.apps.switch_to_displayed_app()
コード例 #32
0
ファイル: app.py プロジェクト: arroway/gaia
 def tap_settings(self):
     settings = Wait(self.marionette).until(
         expected.element_present(*self._settings_button_locator))
     Wait(self.marionette).until(expected.element_displayed(settings))
     settings.tap()
     from gaiatest.apps.cost_control.regions.settings import Settings
     return Settings(self.marionette)
コード例 #33
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)
コード例 #34
0
ファイル: sublist_view.py プロジェクト: Archaeopteryx/gaia
 def tap_first_song(self):
     self.switch_to_active_view()
     song = Wait(self.marionette).until(
         expected.element_present(*self._first_song_locator))
     song.tap()
     self.apps.switch_to_displayed_app()
     return PlayerView(self.marionette)
コード例 #35
0
 def tap_confirm(self):
     # TODO add a good wait here when Bug 1008961 is resolved
     time.sleep(1)
     self.marionette.switch_to_frame()
     confirm = Wait(self.marionette).until(expected.element_present(*self._confirm_install_button_locator))
     Wait(self.marionette).until(expected.element_displayed(confirm))
     confirm.tap()
コード例 #36
0
 def tap_edit(self):
     edit = Wait(self.marionette).until(
         expected.element_present(*self._edit_contact_button_locator))
     Wait(self.marionette).until(expected.element_displayed(edit))
     edit.tap()
     from gaiatest.apps.contacts.regions.contact_form import EditContact
     return EditContact(self.marionette)
コード例 #37
0
ファイル: accessibility.py プロジェクト: Archaeopteryx/gaia
 def tap_confirm_delay(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._confirm_delay_change_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._delay_locator))
コード例 #38
0
ファイル: wifi.py プロジェクト: kuoe0/gaia-dev
    def connect_to_network(self, network_info):

        # Wait for the networks to be found
        this_network_locator = ('xpath', "//li/a/span[text()='%s']" % network_info['ssid'])
        this_network = Wait(self.marionette).until(expected.element_present(*this_network_locator))
        this_network.tap()

        if network_info.get('keyManagement'):
            password = network_info.get('psk') or network_info.get('wep')
            if not password:
                raise Exception('No psk or wep key found in testvars for secured wifi network.')

            screen_width = int(self.marionette.execute_script('return window.innerWidth'))
            ok_button = self.marionette.find_element(*self._password_ok_button_locator)
            Wait(self.marionette).until(lambda m: (ok_button.location['x'] + ok_button.size['width']) == screen_width)
            password_input = self.marionette.find_element(*self._password_input_locator)
            Wait(self.marionette).until(expected.element_displayed(password_input))
            password_input.send_keys(password)
            ok_button.tap()

        connected_message = self.marionette.find_element(*self._connected_message_locator)
        self.marionette.execute_script("arguments[0].scrollIntoView(false);", [connected_message])
        timeout = max(self.marionette.timeout and self.marionette.timeout / 1000, 60)
        Wait(self.marionette, timeout, ignored_exceptions=StaleElementException).until(
            lambda m: m.find_element(*self._connected_message_locator).text == "Connected")
コード例 #39
0
ファイル: language.py プロジェクト: AaskaShah/gaia
 def go_back(self):
     element = Wait(self.marionette).until(expected.element_present(*self._header_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     # TODO: replace this hard coded value with tap on the back button, after Bug 1061698 is fixed
     element.tap(x=10)
     Wait(self.marionette).until(lambda m: m.execute_script(
         "return window.wrappedJSObject.Settings && window.wrappedJSObject.Settings._currentPanel === '#root'"))
コード例 #40
0
ファイル: app.py プロジェクト: uniony/gaia
 def tap_keyboard_language_key(self):
     self.switch_to_keyboard()
     key = Wait(self.marionette).until(
         expected.element_present(*self._language_key_locator))
     Wait(self.marionette).until(expected.element_displayed(key))
     key.tap()
     self.apps.switch_to_displayed_app()
コード例 #41
0
 def tap_export_to_sim(self):
     export_to_sim = Wait(self.marionette).until(
         expected.element_present(*self._export_to_sim_button_locator))
     Wait(self.marionette).until(expected.element_displayed(export_to_sim))
     export_to_sim.tap()
     select_contacts = self.marionette.find_element(*self._select_contacts_locator)
     Wait(self.marionette).until(lambda m: select_contacts.location['y'] == 0)
コード例 #42
0
ファイル: app.py プロジェクト: pottierg/gaia
    def search(self, term):
        iframe = Wait(self.marionette).until(
            expected.element_present(*self._marketplace_iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        self.marionette.switch_to_frame(iframe)

        # This sleep seems necessary, otherwise on device we get timeout failure on display search_box sometimes, see bug 1136791
        import time
        time.sleep(10)

        search_toggle = Wait(self.marionette).until(
            expected.element_present(*self._search_toggle_locator))
        Wait(self.marionette).until(expected.element_displayed(search_toggle))
        search_toggle.tap()

        search_box = Wait(self.marionette).until(
            expected.element_present(*self._search_locator))
        Wait(self.marionette).until(expected.element_displayed(search_box))

        # This sleep is necessary, otherwise the search results are not shown on desktop b2g
        import time
        time.sleep(0.5)

        # search for the app
        search_box.send_keys(term)
        search_box.send_keys(Keys.RETURN)
        return SearchResults(self.marionette)
コード例 #43
0
 def tap_order_by_last_name(self):
     last_name = Wait(self.marionette).until(
         expected.element_present(*self._order_by_last_name_switch_locator))
     Wait(self.marionette).until(expected.element_displayed(last_name))
     initial_state = self.is_custom_element_checked(last_name)
     last_name.tap()
     self.wait_for_custom_element_checked_state(last_name, checked=not(initial_state))
コード例 #44
0
 def tap_share_to_messages(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._share_to_messages_button_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     from gaiatest.apps.messages.regions.new_message import NewMessage
     return NewMessage(self.marionette)
コード例 #45
0
 def tap_export_contacts(self):
     export_contacts = Wait(self.marionette).until(
         expected.element_present(*self._export_contacts_locator))
     Wait(self.marionette).until(expected.element_displayed(export_contacts))
     export_contacts.tap()
     import_settings = self.marionette.find_element(*self._import_settings_locator)
     Wait(self.marionette).until(lambda m: import_settings.location['x'] == 0)
コード例 #46
0
ファイル: wifi.py プロジェクト: nullaus/gaia
    def connect_to_network(self, network_info):

        # Wait for the networks to be found
        this_network_locator = ("xpath", "//li/a/span[text()='%s']" % network_info["ssid"])
        this_network = Wait(self.marionette).until(expected.element_present(*this_network_locator))
        this_network.tap()

        if network_info.get("keyManagement"):
            password = network_info.get("psk") or network_info.get("wep")
            if not password:
                raise Exception("No psk or wep key found in testvars for secured wifi network.")

            screen_width = int(self.marionette.execute_script("return window.innerWidth"))
            ok_button = self.marionette.find_element(*self._password_ok_button_locator)
            Wait(self.marionette).until(lambda m: (ok_button.location["x"] + ok_button.size["width"]) == screen_width)
            password_input = self.marionette.find_element(*self._password_input_locator)
            Wait(self.marionette).until(expected.element_displayed(password_input))
            password_input.send_keys(password)
            ok_button.tap()

        connected_message = self.marionette.find_element(*self._connected_message_locator)
        self.marionette.execute_script("arguments[0].scrollIntoView(false);", [connected_message])
        timeout = max(self.marionette.timeout and self.marionette.timeout / 1000, 60)
        Wait(self.marionette, timeout, ignored_exceptions=StaleElementException).until(
            lambda m: m.find_element(*self._connected_message_locator).text == "Connected"
        )
コード例 #47
0
 def tap_delete_contacts(self):
     delete_contacts = Wait(self.marionette).until(
         expected.element_present(*self._delete_contacts_locator))
     Wait(self.marionette).until(expected.element_displayed(delete_contacts))
     delete_contacts.tap()
     select_contacts = self.marionette.find_element(*self._select_contacts_locator)
     Wait(self.marionette).until(lambda m: select_contacts.location['y'] == 0)
コード例 #48
0
ファイル: alarm.py プロジェクト: AaskaShah/gaia
 def tap_done(self):
     done = Wait(self.marionette).until(expected.element_present(*self._done_locator))
     Wait(self.marionette).until(expected.element_displayed(done))
     done.tap()
     view = self.marionette.find_element(*self._alarm_view_locator)
     Wait(self.marionette).until(lambda m: view.location['x'] == view.size['width'])
     return Clock(self.marionette)
コード例 #49
0
 def tap_import_from_gmail(self):
     import_from_gmail = Wait(self.marionette).until(
         expected.element_present(*self._import_from_gmail_button_locator))
     Wait(self.marionette).until(expected.element_displayed(import_from_gmail))
     import_from_gmail.tap()
     from gaiatest.apps.contacts.regions.gmail import GmailLogin
     return GmailLogin(self.marionette)
コード例 #50
0
ファイル: app.py プロジェクト: pottierg/gaia
 def tap_new_alarm(self):
     new_alarm = Wait(self.marionette).until(
         expected.element_present(*self._alarm_create_new_locator))
     Wait(self.marionette).until(expected.element_displayed(new_alarm))
     new_alarm.tap()
     from gaiatest.apps.clock.regions.alarm import NewAlarm
     return NewAlarm(self.marionette)
コード例 #51
0
 def tap_done(self):
     done_button = Wait(self.marionette).until(
         expected.element_present(*self._done_button_locator))
     Wait(self.marionette).until(expected.element_displayed(done_button))
     done_button.tap()
     # Switch back to Cost Control app frame
     self.apps.switch_to_displayed_app()
コード例 #52
0
ファイル: cell_data.py プロジェクト: Amrltqt/gaia
 def select_sim(self, sim):
     locators = [self._menuItem_carrier_sim1_locator,
                 self._menuItem_carrier_sim2_locator]
     element = Wait(self.marionette).until(
         expected.element_present(*locators[sim]))
     Wait(self.marionette).until(expected.element_dispayed(element))
     element.tap()
コード例 #53
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
コード例 #54
0
ファイル: settings_form.py プロジェクト: AaskaShah/gaia
 def tap_export_contacts(self):
     export_contacts = Wait(self.marionette).until(
         expected.element_present(*self._export_contacts_locator))
     Wait(self.marionette).until(expected.element_displayed(export_contacts))
     export_contacts.tap()
     import_settings = self.marionette.find_element(*self._import_settings_locator)
     Wait(self.marionette).until(lambda m: import_settings.location['x'] == 0)
コード例 #55
0
ファイル: app.py プロジェクト: DouglasSherk/gaia
 def tap_new_alarm(self):
     new_alarm = Wait(self.marionette).until(
         expected.element_present(*self._alarm_create_new_locator))
     Wait(self.marionette).until(expected.element_displayed(new_alarm))
     new_alarm.tap()
     from gaiatest.apps.clock.regions.alarm import NewAlarm
     return NewAlarm(self.marionette)
コード例 #56
0
ファイル: settings_form.py プロジェクト: AaskaShah/gaia
 def tap_import_from_gmail(self):
     import_from_gmail = Wait(self.marionette).until(
         expected.element_present(*self._import_from_gmail_button_locator))
     Wait(self.marionette).until(expected.element_displayed(import_from_gmail))
     import_from_gmail.tap()
     from gaiatest.apps.contacts.regions.gmail import GmailLogin
     return GmailLogin(self.marionette)
コード例 #57
0
ファイル: screen_lock.py プロジェクト: Anirudh0/gaia
 def enable_passcode_lock(self):
     # This wait would be in __init__ but lockscreen could be disabled meaning init would timeout
     element = Wait(self.marionette).until(expected.element_present(*self._passcode_enable_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     section = self.marionette.find_element(*self._screen_lock_passcode_section_locator)
     Wait(self.marionette).until(lambda m: section.location['x'] == 0)