本文整理汇总了Python中gaiatest.apps.videoplayer.app.VideoPlayer.wait_for_progress_bar_complete方法的典型用法代码示例。如果您正苦于以下问题:Python VideoPlayer.wait_for_progress_bar_complete方法的具体用法?Python VideoPlayer.wait_for_progress_bar_complete怎么用?Python VideoPlayer.wait_for_progress_bar_complete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.videoplayer.app.VideoPlayer
的用法示例。
在下文中一共展示了VideoPlayer.wait_for_progress_bar_complete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_play_webm_video
# 需要导入模块: from gaiatest.apps.videoplayer.app import VideoPlayer [as 别名]
# 或者: from gaiatest.apps.videoplayer.app.VideoPlayer import wait_for_progress_bar_complete [as 别名]
def test_play_webm_video(self):
"""https://moztrap.mozilla.org/manage/case/2478/"""
video_player = VideoPlayer(self.marionette)
video_player.launch()
video_player.wait_for_progress_bar_complete()
# 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)