本文整理匯總了Python中gaiatest.apps.system.regions.cards_view.CardsView.open_new_browser方法的典型用法代碼示例。如果您正苦於以下問題:Python CardsView.open_new_browser方法的具體用法?Python CardsView.open_new_browser怎麽用?Python CardsView.open_new_browser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gaiatest.apps.system.regions.cards_view.CardsView
的用法示例。
在下文中一共展示了CardsView.open_new_browser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_browser_private_navigation
# 需要導入模塊: from gaiatest.apps.system.regions.cards_view import CardsView [as 別名]
# 或者: from gaiatest.apps.system.regions.cards_view.CardsView import open_new_browser [as 別名]
def test_browser_private_navigation(self):
self.device.hold_home_button()
cards_view = CardsView(self.marionette)
private_window = cards_view.open_new_private_window()
browser = private_window.go_to_url(self.test_url)
browser.switch_to_content()
Wait(self.marionette).until(lambda m: m.title == 'Mozilla')
self.device.hold_home_button()
cards_view = CardsView(self.marionette)
cards_view.wait_for_cards_view()
search = cards_view.open_new_browser()
# This is to switch the marionette context to the browser content
search.launch()
self.assertEqual(search.history_items_count, 0)