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


Python Wait.send_keys方法代码示例

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


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

示例1: _perform_search

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [as 别名]
 def _perform_search(self, term):
     self.marionette.find_element(*self._search_toggle_locator).tap()
     search_box = Wait(self.marionette).until(
         expected.element_present(*self._search_input_locator))
     Wait(self.marionette).until(expected.element_displayed(search_box))
     search_box.send_keys(term)
     search_box.send_keys(Keys.RETURN)
开发者ID:davehunt,项目名称:marketplace-tests-gaia,代码行数:9,代码来源:base.py

示例2: gmail_login

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [as 别名]
 def gmail_login(self, user, passwd):
     email = Wait(self.marionette).until(
         expected.element_present(*self._email_locator))
     Wait(self.marionette).until(expected.element_displayed(email))
     email.tap()
     email.send_keys(user)
     password = self.marionette.find_element(*self._password_locator)
     password.tap()
     password.send_keys(passwd)
     self.keyboard.dismiss()
     self.marionette.find_element(*self._sign_in_locator).tap()
开发者ID:6a68,项目名称:gaia,代码行数:13,代码来源:gmail.py

示例3: enter_password

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [as 别名]
    def enter_password(self, password=None):
        input = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._password_locator))
        Wait(self.marionette).until(expected.element_displayed(input))
        input.send_keys(password)

        # Wait until the keyboard is completely displayed, otherwise tapping
        # the next button is unreliable
        active_frame = self.marionette.get_active_frame()
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
        self.marionette.switch_to_frame(active_frame)

        self.marionette.find_element(*self._next_locator).tap()
开发者ID:AutomatedTester,项目名称:gaia,代码行数:16,代码来源:fxaccounts.py

示例4: search

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [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)

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

        # search for the app
        search_box.send_keys(term)
        search_box.send_keys(Keys.RETURN)
        return SearchResults(self.marionette)
开发者ID:sdglhm,项目名称:gaia,代码行数:16,代码来源:app.py

示例5: search

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [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)

        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:AutomatedTester,项目名称:gaia,代码行数:20,代码来源:app.py

示例6: select_when_use_is_above_unit_and_value

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [as 别名]
    def select_when_use_is_above_unit_and_value(self, unit, value):
        when_use_is_above_button = self.marionette.find_element(*self._when_use_is_above_button_locator)
        Wait(self.marionette).until(lambda m: when_use_is_above_button.get_attribute('disabled') == 'false')
        when_use_is_above_button.tap()

        current_unit = Wait(self.marionette).until(
            expected.element_present(*self._unit_button_locator))
        Wait(self.marionette).until(expected.element_displayed(current_unit))
        if current_unit.text != unit:
            current_unit.tap()
            # We need to wait for the javascript to do its stuff
            Wait(self.marionette).until(lambda m: current_unit.text == unit)

        # clear the original assigned value and set it to the new value
        size = Wait(self.marionette).until(expected.element_present(*self._size_input_locator))
        Wait(self.marionette).until(expected.element_displayed(size))
        size.clear()
        size.send_keys(value)
        self.marionette.find_element(*self._usage_done_button_locator).tap()
开发者ID:bebef1987,项目名称:gaia,代码行数:21,代码来源:settings.py

示例7: enter_email

# 需要导入模块: from marionette import Wait [as 别名]
# 或者: from marionette.Wait import send_keys [as 别名]
    def enter_email(self, email=None):
        self.marionette.switch_to_frame()
        iframe = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        Wait(self.marionette, timeout=60).until(lambda m: iframe.get_attribute('data-url') != 'about:blank')
        self.marionette.switch_to_frame(iframe)

        input = Wait(self.marionette, timeout=60).until(
            expected.element_present(*self._input_locator))
        Wait(self.marionette).until(expected.element_displayed(input))
        input.send_keys(email)

        # Wait until the keyboard is completely displayed, otherwise tapping
        # the next button is unreliable
        self.marionette.switch_to_frame()
        Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
        self.marionette.switch_to_frame(iframe)

        self.marionette.find_element(*self._next_locator).tap()
开发者ID:AutomatedTester,项目名称:gaia,代码行数:22,代码来源:fxaccounts.py


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