本文整理汇总了Python中gaiatest.apps.browser.app.Browser.tap_go_button方法的典型用法代码示例。如果您正苦于以下问题:Python Browser.tap_go_button方法的具体用法?Python Browser.tap_go_button怎么用?Python Browser.tap_go_button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.browser.app.Browser
的用法示例。
在下文中一共展示了Browser.tap_go_button方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_persona_cookie
# 需要导入模块: from gaiatest.apps.browser.app import Browser [as 别名]
# 或者: from gaiatest.apps.browser.app.Browser import tap_go_button [as 别名]
def test_persona_cookie(self):
"""
Smoketest of cookie handling/Persona integration
Log in with Persona user
After refreshing 123done should still be logged in (cookie retained)
"""
browser = Browser(self.marionette)
browser.launch()
browser.go_to_url('http://firefoxos.123done.org')
browser.switch_to_content()
self.wait_for_element_displayed(*self._logged_out_button_locator, timeout=120)
login_button = self.marionette.find_element(*self._logged_out_button_locator)
login_button.click()
persona = Persona(self.marionette)
persona.login(self.user.email, self.user.password)
# wait to fall back to browser
self.wait_for_condition(lambda m: self.apps.displayed_app.name == browser.name)
self.apps.switch_to_displayed_app()
browser.switch_to_content()
self.wait_for_element_displayed(*self._logged_in_button_locator)
browser.switch_to_chrome()
# Refresh the page
browser.tap_go_button()
# Now we expect B2G to retain the Persona cookie and remain logged in
browser.switch_to_content()
self.wait_for_element_displayed(*self._logged_in_button_locator)