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


Python Settings.set_alarm_volume方法代码示例

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


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

示例1: test_main

# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import set_alarm_volume [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.clock = Clock(self)
        self.settings = Settings(self)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Set the volume to be low (no need to wake up the office! ;o)
        self.settings.set_alarm_volume(0)

        # Launch clock app.
        self.clock.launch()

        # Delete all previous alarms.
        #
        self.clock.delete_all_alarms()

        # Create an alarm that is 1 minute in the future.
        # (Make sure we're not about to do this at the end of a minute or an hour.)
        #
        now_mins = time.strftime("%M", time.gmtime())
        diff_m = 60 - int(now_mins)
        if diff_m <= 1:
            time.sleep(60)

        now_secs = time.strftime("%S", time.gmtime())
        diff_s = 60 - int(now_secs)
        if diff_s <= 15:
            time.sleep(diff_s)

        t = datetime.datetime.now() + datetime.timedelta(minutes=1)

        title = "Test alarm"
        self.clock.create_alarm(t.hour, t.minute, title)
        """
        Return to the main screen (since this is where the user will
        most likely be when the alarm goes off).
        """

        self.UTILS.home.goHome()

        # Check the statusbar icon exists.
        self.UTILS.test.test(self.clock.checkStatusbarIcon(), "Alarm icon is present in statusbar.")

        # Wait for the alarm to start.
        self.clock.checkAlarmRingDetails(t.hour, t.minute, title)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:57,代码来源:_test_26348.py


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