本文整理汇总了Python中marionette.Wait类的典型用法代码示例。如果您正苦于以下问题:Python Wait类的具体用法?Python Wait怎么用?Python Wait使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Wait类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: tap_share_to_messages
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)
开发者ID:bebef1987,项目名称:gaia,代码行数:7,代码来源:browser.py
示例2: tap_done
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:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:alarm.py
示例3: connect_to_network
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:William-Hsu,项目名称:gaia,代码行数:25,代码来源:wifi.py
示例4: tap_settings
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)
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:app.py
示例5: _perform_search
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,代码行数:7,代码来源:base.py
示例6: tap_import_from_gmail
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)
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:settings_form.py
示例7: tap_share_button
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:hharchani,项目名称:gaia,代码行数:7,代码来源:multiple_selection_view.py
示例8: tap_export_contacts
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)
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:settings_form.py
示例9: select_sim
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()
开发者ID:William-Hsu,项目名称:gaia,代码行数:7,代码来源:cell_data.py
示例10: tap_export_to_sim
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:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:settings_form.py
示例11: tap_done
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:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:fxaccounts.py
示例12: tap_delete_contacts
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:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:settings_form.py
示例13: tap_call_button
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:AxelRoyer,项目名称:gaia,代码行数:7,代码来源:keypad.py
示例14: go_back
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'"))
开发者ID:William-Hsu,项目名称:gaia,代码行数:7,代码来源:language.py
示例15: wait_for_enable_switch_to_be_turned_on
def wait_for_enable_switch_to_be_turned_on(self):
findmydevice = Wait(self.marionette, timeout=60).until(
expected.element_present(*self._findmydevice_locator))
Wait(self.marionette).until(expected.element_displayed(findmydevice))
checkbox = Wait(self.marionette, timeout=60).until(
expected.element_present(*self._checkbox_locator))
Wait(self.marionette).until(lambda m: checkbox.is_selected())
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:findmydevice.py
示例16: tap_done
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()
开发者ID:bebef1987,项目名称:gaia,代码行数:7,代码来源:settings.py
示例17: enable_passcode_lock
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)
开发者ID:William-Hsu,项目名称:gaia,代码行数:7,代码来源:screen_lock.py
示例18: tap_edit
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()
Wait(self.marionette).until(expected.element_not_displayed(edit))
from gaiatest.apps.contacts.regions.contact_form import EditContact
return EditContact(self.marionette)
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:contact_details.py
示例19: tap_send
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)
开发者ID:Wikiwide,项目名称:gaia,代码行数:8,代码来源:new_message.py
示例20: tap_confirm
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()
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:confirm_install.py
注:本文中的marionette.Wait类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论