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


Python Calendar.wait_to_be_displayed方法代码示例

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


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

示例1: TestCardsView

# 需要导入模块: from gaiatest.apps.calendar.app import Calendar [as 别名]
# 或者: from gaiatest.apps.calendar.app.Calendar import wait_to_be_displayed [as 别名]
class TestCardsView(GaiaTestCase):


    def setUp(self):
        GaiaTestCase.setUp(self)

        self.calendar = Calendar(self.marionette)
        self.calendar.launch()
        self.clock = Clock(self.marionette)
        self.clock.launch()

        # Switch to top level frame before starting the test
        self.marionette.switch_to_frame()

    def test_that_app_can_be_launched_from_cards_view(self):
        """
        https://moztrap.mozilla.org/manage/case/2462/
        """

        cards_view = CardsView(self.marionette)
        self.assertFalse(cards_view.is_displayed, 'Cards view not expected to be visible')

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

        # Wait for first app ready
        cards_view.cards[1].wait_for_centered()

        self.assertIn(cards_view.cards[0].manifest_url, self.calendar.manifest_url)
        self.assertTrue(cards_view.cards[0].is_displayed,
                            '%s app should be present in cards view' % cards_view.cards[1].title)
        self.assertIn(cards_view.cards[1].manifest_url, self.clock.manifest_url)
        self.assertTrue(cards_view.cards[1].is_displayed,
                            '%s app should be present in cards view' % cards_view.cards[1].title)

        cards_view.swipe_to_previous_app()

        # Wait for previous app ready
        cards_view.cards[0].wait_for_centered()
        cards_view.cards[0].tap()

        cards_view.wait_for_cards_view_not_displayed()

        self.calendar.wait_to_be_displayed()
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:47,代码来源:test_cards_view_with_two_apps.py


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