当前位置: 首页>>代码示例>>Python>>正文


Python Wait.tap方法代码示例

本文整理汇总了Python中marionette_driver.Wait.tap方法的典型用法代码示例。如果您正苦于以下问题:Python Wait.tap方法的具体用法?Python Wait.tap怎么用?Python Wait.tap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在marionette_driver.Wait的用法示例。


在下文中一共展示了Wait.tap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: select_change_icon_layout

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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))
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:9,代码来源:homescreen_settings.py

示例2: tap_export_to_sim

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:settings_form.py

示例3: tap_delete_contacts

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:settings_form.py

示例4: tap_done

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:alarm.py

示例5: tap_back_button

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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))
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:app.py

示例6: search

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
    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)
开发者ID:anubhav7495,项目名称:gaia,代码行数:29,代码来源:app.py

示例7: connect_to_network

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
    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"
        )
开发者ID:nullaus,项目名称:gaia,代码行数:28,代码来源:wifi.py

示例8: tap_done

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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()
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:fxaccounts.py

示例9: tap_call_button

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:keypad.py

示例10: open_get_more_home_screen

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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))
开发者ID:eliperelman,项目名称:gaia,代码行数:9,代码来源:homescreen_settings.py

示例11: test_post_camera_preview

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
    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")
开发者ID:JonHylands,项目名称:power-tests,代码行数:27,代码来源:test_post_idle.py

示例12: open_change_home_screen

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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())
开发者ID:eliperelman,项目名称:gaia,代码行数:9,代码来源:homescreen_settings.py

示例13: tap_edit

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:DouglasSherk,项目名称:gaia,代码行数:9,代码来源:contact_details.py

示例14: tap_share_button

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:AaskaShah,项目名称:gaia,代码行数:9,代码来源:multiple_selection_view.py

示例15: tap_first_song

# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import tap [as 别名]
 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)
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:9,代码来源:sublist_view.py


注:本文中的marionette_driver.Wait.tap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。