本文整理汇总了Python中myLib.miro_app.MiroApp.verify_audio_playback方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.verify_audio_playback方法的具体用法?Python MiroApp.verify_audio_playback怎么用?Python MiroApp.verify_audio_playback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.verify_audio_playback方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_361
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import verify_audio_playback [as 别名]
def test_361(self):
"""http://litmus.pculture.org/show_test.cgi?id=361 edit item video to audio.
1. add 3-blip-videos feed
2. download the Joo Joo
3. Edit item from Video to Audio
4. Verify item played as audio item
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://qa.pculture.org/feeds_test/MixedCats.xml"
feed = "MIXED"
title = "Tongue"
new_type = "Music"
old_type = "Video"
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.show_audio_in_music("on")
general_tab.show_videos_in_videos("on")
podcasts_tab = prefs.open_tab("Podcasts")
podcasts_tab.autodownload_setting("Off")
podcasts_tab.close_prefs()
#start clean
miro.delete_feed(reg, feed)
#add feed and download joo joo item
miro.add_feed(reg, url,feed)
miro.tab_search(reg, title)
if reg.m.exists("button_download.png",10):
click(reg.m.getLastMatch())
miro.wait_for_item_in_tab(reg, "Videos", item=title)
reg.m.find(title)
reg.m.click(title)
reg.mtb.click("tabsearch_clear.png")
miro.edit_item_type(reg, new_type, old_type)
#locate item in audio tab and verify playback
miro.wait_for_item_in_tab(reg, tab="Music",item=title)
reg.m.click(title)
type(' ') #use spacebar to start playback
self.assertTrue(miro.verify_audio_playback(reg, title))
miro.stop_audio_playback(reg, title)
#cleanup
miro.delete_feed(reg, feed)
示例2: test_620
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import verify_audio_playback [as 别名]
def test_620(self):
"""http://litmus.pculture.org/show_test.cgi?id=620 dl youtube video and convert.
1. Download youtube video
2. Convert to video formats
3. Verify playback
4. Convert to audio formats
5. Verify playback
6. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
# 1. Download youtube vidoe
vid_url = "http://www.youtube.com/watch?v=baJ43ByylbM&feature=fvw"
item_title = "Zoom"
reg.tl.click("File")
reg.tl.click("Download from")
time.sleep(4)
type(vid_url)
time.sleep(2)
type("\n")
miro.confirm_download_started(reg, item_title)
miro.wait_for_item_in_tab(reg, "videos",item_title)
if reg.m.exists(item_title,3):
miro.log_result("9","test_620 file external download verified.")
reg.m.click(item_title)
# 2. Convert to audio formats
try:
aconvertList = ("MP3","Vorbis")
for x in aconvertList:
miro.convert_file(reg, x)
time.sleep(2)
miro.click_sidebar_tab(reg, "Converting")
miro.wait_conversions_complete(reg, item_title,x)
# 3. Verify playback
miro.click_sidebar_tab(reg, "music")
aplaybackList = ("MP3",)
for x in aplaybackList:
miro.tab_search(reg, "Converted to "+str(x),False)
if reg.m.exists(Pattern("item_play_unplayed.png")):
doubleClick(reg.m.getLastMatch())
self.assertTrue(miro.verify_audio_playback(reg, title))
miro.stop_audio_playback(reg, title)
else:
self.fail("converted item not found")
except FindFailed, debugging:
self.verificationErrors.append(debugging)