本文整理汇总了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.")