本文整理汇总了Python中marionette_driver.expected.element_not_displayed函数的典型用法代码示例。如果您正苦于以下问题:Python element_not_displayed函数的具体用法?Python element_not_displayed怎么用?Python element_not_displayed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了element_not_displayed函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tap_back_button
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))
示例2: go_back
def go_back(self):
Wait(self.marionette).until(expected.element_enabled(self.root_element) and
expected.element_displayed(self.root_element))
self.marionette.switch_to_shadow_root(self.root_element)
self.marionette.find_element(*self._back_button_locator).tap()
self.marionette.switch_to_shadow_root()
Wait(self.marionette).until(expected.element_not_displayed(self.root_element))
示例3: tap_save_event
def tap_save_event(self):
event_start_time = self.marionette.find_element(*self._event_start_time_value_locator).text
event_start_date = self.marionette.find_element(*self._event_start_date_value_locator).text
el = self.marionette.find_element(*self._modify_event_view_locator)
self.marionette.find_element(*self._save_event_button_locator).tap()
Wait(self.marionette).until(expected.element_not_displayed(el))
return datetime.strptime(event_start_time + event_start_date, '%I:%M %p%m/%d/%Y')
示例4: tap_settings
def tap_settings(self):
settings = self.marionette.find_element(*self._settings_button_locator)
Wait(self.marionette).until(expected.element_displayed(settings))
settings.tap()
Wait(self.marionette).until(expected.element_not_displayed(settings))
from gaiatest.apps.contacts.regions.settings_form import SettingsForm
return SettingsForm(self.marionette)
示例5: tap_tile_view_button
def tap_tile_view_button(self):
fullscreen = self.marionette.find_element(*self._fullscreen_view_locator)
self.marionette.find_element(*self._tile_view_locator).tap()
Wait(self.marionette).until(expected.element_not_displayed(fullscreen))
from gaiatest.apps.gallery.app import Gallery
return Gallery(self.marionette)
示例6: confirm_turnon_options
def confirm_turnon_options(self):
self.marionette.switch_to_frame()
close_btn = self.marionette.find_element(By.CSS_SELECTOR, 'button.value-option-confirm')
close_btn.tap()
Wait(self.marionette).until(expected.element_not_displayed(close_btn))
self.apps.switch_to_displayed_app()
Wait(self.marionette).until(expected.element_displayed(*self._power_save_checkbox_locator))
示例7: tap_next_to_wifi_section
def tap_next_to_wifi_section(self):
progress = self.marionette.find_element(*self._loading_overlay_locator)
self.tap_next()
Wait(self.marionette).until(expected.element_not_displayed(progress))
Wait(self.marionette).until(expected.element_displayed(
Wait(self.marionette).until(expected.element_present(
*self._section_wifi_locator))))
示例8: a11y_click_save_event
def a11y_click_save_event(self):
event_start_time = self.marionette.find_element(*self._event_start_time_value_locator).text
event_start_date = self.marionette.find_element(*self._event_start_date_value_locator).text
el = self.marionette.find_element(*self._modify_event_view_locator)
self.accessibility.click(self.marionette.find_element(*self._save_event_button_locator))
Wait(self.marionette).until(expected.element_not_displayed(el))
return datetime.strptime(event_start_time + event_start_date, "%I:%M %p%m/%d/%Y")
示例9: reject_call
def reject_call(self):
Wait(self.marionette).until(
expected.element_displayed(*self._lockscreen_handle_locator))
self._handle_incoming_call('reject')
self.marionette.switch_to_frame()
Wait(self.marionette).until(
expected.element_not_displayed(*self._call_screen_locator))
示例10: tap_done
def tap_done(self):
time_picker = self.marionette.find_element(*self._time_picker_locator)
self.marionette.find_element(*self._done_button_locator).tap()
Wait(self.marionette).until(expected.element_not_displayed(time_picker))
# TODO: wait for the time picker to fade out Bug 1038186
time.sleep(2)
self.apps.switch_to_displayed_app()
示例11: cancel_get_more_home_screen
def cancel_get_more_home_screen(self):
self.marionette.find_element(*self._pick_cancel_button_locator).tap()
Wait(self.marionette).until(expected.element_not_displayed(*self._pick_cancel_button_locator))
self.apps.switch_to_displayed_app()
element = Wait(self.marionette).until(
expected.element_present(*self._change_homescreen_page_locator))
Wait(self.marionette).until(expected.element_displayed(element))
示例12: tap_lets_go
def tap_lets_go(self):
self.marionette.find_element(*self._go_button_locator).tap()
Wait(self.marionette).until(expected.element_not_displayed(*self._ftu_frame_locator))
self.apps.switch_to_displayed_app()
# TODO Some wait for Usage to fully initialize
time.sleep(2)
示例13: select
def select(self, match_string):
# This needs to be duplicated from base.py because when we return from the frame
# we don't return to the Settings app in its initial state,
# so the wait for in its launch method times out
# have to go back to top level to get the B2G select box wrapper
self.marionette.switch_to_frame()
Wait(self.marionette).until(
expected.elements_present(
By.CSS_SELECTOR, '.value-selector-container li'))
options = self.marionette.find_elements(By.CSS_SELECTOR, '.value-selector-container li')
close = self.marionette.find_element(By.CSS_SELECTOR, 'button.value-option-confirm')
# loop options until we find the match
for li in options:
if match_string == li.text:
li.tap()
break
else:
raise Exception("Element '%s' could not be found in select wrapper" % match_string)
close.tap()
Wait(self.marionette).until(expected.element_not_displayed(close))
# TODO we should find something suitable to wait for, but this goes too
# fast against desktop builds causing intermittent failures
time.sleep(0.2)
# now back to app
self.apps.switch_to_displayed_app()
示例14: select
def select(self, match_string):
# This needs to be duplicated from base.py for a few reasons:
# 1. When we return from the frame we don't return to the Settings app in its initial state,
# so the wait for in its launch method times out
# 2. We need to use in instead of == on the match text because of the directional strings
# have to go back to top level to get the B2G select box wrapper
self.marionette.switch_to_frame()
options = Wait(self.marionette).until(expected.elements_present(
By.CSS_SELECTOR, '.value-selector-container li'))
close = self.marionette.find_element(By.CSS_SELECTOR, 'button.value-option-confirm')
# loop options until we find the match
for li in options:
if match_string in li.text:
self.marionette.execute_script('arguments[0].scrollIntoView(false);', [li])
li.tap()
break
else:
raise Exception("Element '%s' could not be found in select wrapper" % match_string)
close.tap()
Wait(self.marionette).until(expected.element_not_displayed(close))
# TODO we should find something suitable to wait for, but this goes too
# fast against desktop builds causing intermittent failures
time.sleep(0.2)
# now back to app
self.apps.switch_to_displayed_app()
示例15: cancel_pick_wallpaper
def cancel_pick_wallpaper(self):
self.marionette.switch_to_frame()
self.marionette.find_element(*self._pick_cancel_button_locator).tap()
Wait(self.marionette).until(expected.element_not_displayed(*self._pick_cancel_button_locator))
self.apps.switch_to_displayed_app()
element = Wait(self.marionette).until(
expected.element_present(*self._wallpaper_preview_locator))
Wait(self.marionette).until(expected.element_displayed(element))