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


Python VideoPlayer.wait_for_thumbnails_displayed方法代码示例

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


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

示例1: test_play_3gp_video

# 需要导入模块: from gaiatest.apps.videoplayer.app import VideoPlayer [as 别名]
# 或者: from gaiatest.apps.videoplayer.app.VideoPlayer import wait_for_thumbnails_displayed [as 别名]
    def test_play_3gp_video(self):
        """https://moztrap.mozilla.org/manage/case/2478/"""

        video_player = VideoPlayer(self.marionette)
        video_player.launch()
        video_player.wait_for_thumbnails_displayed()

        # Assert that there is at least one video available
        self.assertGreater(video_player.total_video_count, 0)

        first_video_name = video_player.first_video_name

        # Click on the first video.
        fullscreen_video = video_player.tap_first_video_item()

        # Video will play automatically
        # We'll wait for the controls to clear so we're 'safe' to proceed
        time.sleep(2)

        # We cannot tap the toolbar so let's just enable it with javascript
        fullscreen_video.display_controls_with_js()

        # The elapsed time > 0:00 denote the video is playing
        zero_time = time.strptime('00:00', '%M:%S')
        self.assertGreater(fullscreen_video.elapsed_time, zero_time)

        # Check the name too. This will only work if the toolbar is visible.
        self.assertEqual(first_video_name, fullscreen_video.name)
开发者ID:AnandMoorthy,项目名称:gaia,代码行数:30,代码来源:test_play_3gp_video.py


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