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


Python Clock.wait_for_new_alarm_button方法代码示例

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


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

示例1: TestClockDeleteAlarm

# 需要导入模块: from gaiatest.apps.clock.app import Clock [as 别名]
# 或者: from gaiatest.apps.clock.app.Clock import wait_for_new_alarm_button [as 别名]
class TestClockDeleteAlarm(GaiaTestCase):

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

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

        # create a new alarm with the default values that are available
        new_alarm = self.clock.tap_new_alarm()
        self.clock = new_alarm.tap_done()
        self.clock.wait_for_banner_not_visible()

    def test_clock_delete_alarm(self):
        """ Delete alarm
        https://moztrap.mozilla.org/manage/case/1783/
        """

        # find the origin alarms' number
        initial_alarms_count = len(self.clock.alarms)

        # edit alarm
        edit_alarm = self.clock.alarms[0].tap()

        # delete alarm
        self.clock = edit_alarm.tap_delete()

        # wait alarm item not displayed
        self.clock.wait_for_new_alarm_button()
        self.wait_for_condition(lambda m: len(self.clock.alarms) != initial_alarms_count)

        self.assertEqual(len(self.clock.alarms), initial_alarms_count - 1, "delete alarm failed.")
开发者ID:AaronMT,项目名称:gaia-ui-tests,代码行数:34,代码来源:test_clock_delete_alarm.py


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