本文整理汇总了Python中marionette_driver.Wait.clear方法的典型用法代码示例。如果您正苦于以下问题:Python Wait.clear方法的具体用法?Python Wait.clear怎么用?Python Wait.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类marionette_driver.Wait
的用法示例。
在下文中一共展示了Wait.clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: email
# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import clear [as 别名]
def email(self, value):
"""Set the value of the email field."""
email = Wait(self.driver, self.timeout).until(
expected.element_present(*self._email_input_locator))
Wait(self.driver, self.timeout).until(
expected.element_displayed(email))
email.clear()
email.send_keys(value)
示例2: select_when_use_is_above_unit_and_value
# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import clear [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()
示例3: _type_in_field
# 需要导入模块: from marionette_driver import Wait [as 别名]
# 或者: from marionette_driver.Wait import clear [as 别名]
def _type_in_field(self, add_locator, field_locator, value):
Wait(self.marionette).until(expected.element_present(*add_locator)).tap()
element = Wait(self.marionette).until(expected.element_present(*field_locator))
Wait(self.marionette).until(expected.element_displayed(element))
element.clear()
element.send_keys(value)