本文整理汇总了Python中marionette.expected.element_present函数的典型用法代码示例。如果您正苦于以下问题:Python element_present函数的具体用法?Python element_present怎么用?Python element_present使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了element_present函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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
示例2: a11y_click_month_display_button
def a11y_click_month_display_button(self):
self.accessibility.click(self.marionette.find_element(*self._month_display_button_locator))
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._current_monthly_calendar_locator))))
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._current_month_day_agenda_locator))))
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:app.py
示例3: launch
def launch(self):
Base.launch(self)
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._visible_clock_locator))))
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._alarm_create_new_locator))))
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:app.py
示例4: tap_unlink_contact
def tap_unlink_contact(self):
facebook_unlink_button = Wait(self.marionette).until(expected.element_present(*self._facebook_link_locator))
Wait(self.marionette).until(expected.element_displayed(facebook_unlink_button))
facebook_unlink_button.tap()
facebook_confirm_unlink_button = Wait(self.marionette).until(expected.element_present(*self._confirm_unlink_button_locator))
Wait(self.marionette).until(expected.element_displayed(facebook_confirm_unlink_button))
facebook_confirm_unlink_button.tap()
self.apps.switch_to_displayed_app()
开发者ID:bebef1987,项目名称:gaia,代码行数:9,代码来源:contact_details.py
示例5: unlock_to_passcode_pad
def unlock_to_passcode_pad(self):
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._lockscreen_handle_locator))))
self._slide_to_unlock('homescreen')
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._lockscreen_passcode_code_locator))))
return PasscodePad(self.marionette)
开发者ID:AutomatedTester,项目名称:gaia,代码行数:9,代码来源:app.py
示例6: tap_import_from_sim
def tap_import_from_sim(self):
import_from_sim = Wait(self.marionette).until(
expected.element_present(*self._import_from_sim_button_locator))
Wait(self.marionette).until(expected.element_displayed(import_from_sim))
import_from_sim.tap()
from gaiatest.apps.contacts.app import Contacts
status_message = Wait(self.marionette).until(
expected.element_present(*Contacts._status_message_locator))
Wait(self.marionette).until(expected.element_displayed(status_message))
Wait(self.marionette).until(expected.element_not_displayed(status_message))
开发者ID:AutomatedTester,项目名称:gaia,代码行数:10,代码来源:settings_form.py
示例7: __init__
def __init__(self, marionette):
Base.__init__(self, marionette)
# wait for the pop up screen to open
view = Wait(self.marionette).until(expected.element_present(*self._iframe_locator))
self.marionette.switch_to_frame(view)
# wait for the page to load
email = Wait(self.marionette).until(expected.element_present(*self._email_locator))
Wait(self.marionette).until(lambda m: email.get_attribute("value") != "")
开发者ID:hharchani,项目名称:gaia,代码行数:10,代码来源:google.py
示例8: __init__
def __init__(self, marionette):
Base.__init__(self, marionette)
# go into iframe of usage app settings
frame = Wait(self.marionette).until(expected.element_present(
*self._settings_iframe_locator))
Wait(self.marionette).until(expected.element_displayed(frame))
self.marionette.switch_to_frame(frame)
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._settings_title_locator))))
开发者ID:bebef1987,项目名称:gaia,代码行数:11,代码来源:settings.py
示例9: tap_delete_button
def tap_delete_button(self, confirm=True):
delete_button = Wait(self.marionette).until(
expected.element_present(*self._delete_thumbnail_locator))
Wait(self.marionette).until(expected.element_displayed(delete_button))
delete_button.tap()
if confirm:
confirm_decision_button = Wait(self.marionette).until(
expected.element_present(*self._delete_confirm_locator))
else:
confirm_decision_button = Wait(self.marionette).until(
expected.element_present(*self._delete_cancel_locator))
Wait(self.marionette).until(expected.element_displayed(confirm_decision_button))
confirm_decision_button.tap()
开发者ID:anrao91,项目名称:gaia,代码行数:14,代码来源:multiple_selection_view.py
示例10: search
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,代码行数:14,代码来源:app.py
示例11: reset_mobile_usage
def reset_mobile_usage(self):
self.marionette.find_element(*self._reset_button_locator).tap()
reset_mobile_usage = Wait(self.marionette).until(
expected.element_present(*self._reset_mobile_usage_button_locator))
Wait(self.marionette).until(expected.element_displayed(reset_mobile_usage))
reset_dialog = self.marionette.find_element(*self._reset_dialog_locator)
reset_mobile_usage.tap()
confirm_reset_button = Wait(self.marionette).until(
expected.element_present(*self._confirm_reset_button_locator))
Wait(self.marionette).until(expected.element_displayed(confirm_reset_button))
confirm_reset_button.tap()
Wait(self.marionette).until(expected.element_not_displayed(reset_dialog))
开发者ID:bebef1987,项目名称:gaia,代码行数:14,代码来源:settings.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_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
示例14: 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
示例15: __init__
def __init__(self, marionette):
Base.__init__(self, marionette)
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._crop_view_locator))))
done = self.marionette.find_element(*self._crop_done_button_locator)
Wait(self.marionette).until(expected.element_enabled(done))
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:crop_view.py
示例16: 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
示例17: launch
def launch(self):
Base.launch(self)
Wait(self.marionette, ignored_exceptions=JavascriptException).until(
lambda m: m.execute_script('return window.wrappedJSObject.Contacts.asyncScriptsLoaded;') is True)
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._settings_button_locator))))
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:app.py
示例18: 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
示例19: __init__
def __init__(self, marionette):
Base.__init__(self, marionette)
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._contact_import_picker_frame_locator))))
select_contacts = self.marionette.find_element(*self._contact_import_picker_frame_locator)
self.marionette.switch_to_frame(select_contacts)
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:contact_import_picker.py
示例20: 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
注:本文中的marionette.expected.element_present函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论