当前位置: 首页>>代码示例>>Python>>正文


Python CardsView.wait_for_no_card_displayed方法代码示例

本文整理汇总了Python中gaiatest.apps.system.regions.cards_view.CardsView.wait_for_no_card_displayed方法的典型用法代码示例。如果您正苦于以下问题:Python CardsView.wait_for_no_card_displayed方法的具体用法?Python CardsView.wait_for_no_card_displayed怎么用?Python CardsView.wait_for_no_card_displayed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gaiatest.apps.system.regions.cards_view.CardsView的用法示例。


在下文中一共展示了CardsView.wait_for_no_card_displayed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestCardsViewTwoApps

# 需要导入模块: from gaiatest.apps.system.regions.cards_view import CardsView [as 别名]
# 或者: from gaiatest.apps.system.regions.cards_view.CardsView import wait_for_no_card_displayed [as 别名]
class TestCardsViewTwoApps(GaiaImageCompareTestCase):

    def setUp(self):
        GaiaImageCompareTestCase.setUp(self)
        self.cards_view = CardsView(self.marionette)

        self.contacts = Contacts(self.marionette)
        self.contacts.launch()
        self.gallery = Gallery(self.marionette)
        self.gallery.launch(empty=True)

        # 10 seconds for the actual user using the app a bit, and going back to homescreen
        time.sleep(10)
        self.device.touch_home_button()

    def test_cards_view_kill_apps_with_two_apps(self):
        """https://moztrap.mozilla.org/manage/case/1917/"""

        # Pull up the cards view
        self.device.hold_home_button()
        self.cards_view.wait_for_cards_view()

        # Wait for first app ready
        self.cards_view.cards[1].wait_for_centered()
        self.take_screenshot(top_frame=True)

        # Close the current apps from the cards view
        self.cards_view.cards[1].close()
        self.cards_view.cards[0].wait_for_centered()
        self.take_screenshot(top_frame=True)
        self.cards_view.cards[0].close()
        self.cards_view.wait_for_cards_view_not_displayed()
        self.take_screenshot(top_frame=True)

        # If successfully killed, the apps should no longer appear in the cards view
        # and the "No recent apps" message should be displayed
        self.device.hold_home_button()
        self.cards_view.wait_for_no_card_displayed()
        self.take_screenshot(top_frame=True)
        self.assertEqual(len(self.cards_view.cards), 0)
        self.assertTrue(self.cards_view.is_no_card_displayed)
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:43,代码来源:test_cards_view_kill_apps_with_two_apps.py


注:本文中的gaiatest.apps.system.regions.cards_view.CardsView.wait_for_no_card_displayed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。