本文整理汇总了Python中myLib.miro_app.MiroApp.confirm_download_started方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.confirm_download_started方法的具体用法?Python MiroApp.confirm_download_started怎么用?Python MiroApp.confirm_download_started使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.confirm_download_started方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_338
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_338(self):
"""http://litmus.pculture.org/show_test.cgi?id=338 delete feed with dl items.
Litmus Test Title:: 338 - channels delete a feed with downloads in progress
Description:
1. Add the 3-blip-videos feed. Start items downloading
2. Remove the feed and verify downloads are removed.
"""
#set the search regions
reg = MiroRegions()
miro = MiroApp()
url = "http://pculture.org/feeds_test/3blipvideos.xml"
feed = "ThreeBlip"
#1. Add the feed and start dl
miro.cancel_all_downloads(reg)
miro.add_feed(reg, url,feed)
miro.download_all_items(reg)
time.sleep(2)
miro.confirm_download_started(reg, "The Joo")
miro.delete_feed(reg, feed)
time.sleep(5)
if reg.s.exists("Downloading",5):
self.fail("Downloading tab still present")
示例2: test_182
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_182(self):
"""http://litmus.pculture.org/show_test.cgi?id=182 dl from youtube site.
1. Open youtube url as site
2. download button
3. verify download started
4. Cleanup
"""
site_url = "http://www.youtube.com/watch?v=fgg2tpUVbXQ&feature=channel"
site = "Hubble"
reg = MiroRegions()
miro = MiroApp()
try:
miro.add_source_from_tab(reg, site_url)
miro.click_last_source(reg)
if reg.mtb.exists(Pattern("download_this_video.png")) or \
reg.mtb.exists("Download this"):
click(reg.mtb.getLastMatch())
time.sleep(3)
miro.confirm_download_started(reg, "Deep")
reg.mtb.click("download-cancel.png")
finally:
miro.delete_site(reg, site)
示例3: test_620
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [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)
示例4: test_419
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_419(self):
"""http://litmus.pculture.org/show_test.cgi?id=419 external torrent dl.
1. clearbits torrent dl
2. open with File Download menu
3. Verify download started and metadata
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
item_url = "http://youtorrent.com/download/7379834/young-broke-and-fameless-the-mixtape.torrent"
item_title = "Fameless"
reg.tl.click("File")
reg.tl.click("Download from")
time.sleep(5)
type(item_url+"\n")
print ("confirm download started")
status = miro.confirm_download_started(reg, item_title)
print status
if status == "downloaded":
miro.delete_items(reg, item_title,"Misc")
elif status == "in_progress":
miro.delete_items(reg, item_title,"Downloading")
else:
self.fail("Can not confirm download started")
示例5: test_441
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_441(self):
"""http://litmus.pculture.org/show_test.cgi?id=441 delete podcast item outside of miro
1. add TWO STUPID feed
2. download the Flip Faceitem
3. restart miro
4. delete the item
5. restart miro
6. verify item still deleted
"""
reg = MiroRegions()
miro = MiroApp()
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.close_prefs()
url = "http://qa.pculture.org/feeds_test/2stupidvideos.xml"
feed = "TWO STUPID"
title = "Flip" # item title updates when download completes
#add feed and download flip face item
miro.add_feed(reg, url,feed)
miro.toggle_normal(reg)
miro.tab_search(reg, title)
if reg.m.exists("button_download.png",10):
click(reg.m.getLastMatch())
miro.wait_for_item_in_tab(reg, tab="Videos",item=title)
reg.m.find(title)
reg.m.click(title)
reg.mtb.click("tabsearch_clear.png")
filepath = miro.store_item_path(reg)
if os.path.exists(filepath):
print "able to verify on os level"
found_file = True
miro.tab_search(reg, title)
reg.m.click(title)
type(Key.DELETE)
if found_file == True:
if os.path.exists(filepath):
self.fail("file not deleted from filesystem")
else:
miro.quit_miro()
miro.restart_miro()
miro.click_podcast(reg, feed)
miro.tab_search(reg, term)
if not reg.m.exists(Pattern("button_download.png")):
self.fail("no download button, file not deleted")
else:
reg.m.click(Pattern("button_download.png"))
if miro.confirm_download_started(reg, title) != "in_progress":
self.fail("item not properely deleted")
#cleanup
miro.delete_feed(reg, feed)
示例6: skip_192
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def skip_192(self):
"""http://litmus.pculture.org/show_test.cgi?id=192 file detection dl.
1. Add clearbits.net page as a source
2. click to dl the torrent file
3. Verify file starts to download
4. Cleanup
"""
site_url = "http://pculture.org/feeds_test/http-direct-downloads.html"
site = "HTTP Direct"
## FIX ME - Need new files, can't download from the videolan ftp site anymore
HTTPDOWNLOADS = {".mpFour download":"big",
".mpThree download":"gd",
".mFoura download":"luckynight",
# ".mpeg download":"mighty",
# ".ogv download":"popeye",
# ".mov download":"Matrix",
# ".wmv download":"WindowsMedia",
# ".avi download":"Coyote",
# ".mpg download":"dothack2",
# ".mkv download 2":"mulitple",
# ".ogg download":"gd",
# ".wma download":"Bangles",
# ".flac download":"luckynight",
# ".mka download":"Widow",
}
setAutoWaitTimeout(20)
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.click_source(reg, site)
for filetype, title in HTTPDOWNLOADS.iteritems():
try:
if reg.m.exists(filetype):
click(reg.m.getLastMatch())
else:
type(Key.PAGE_DOWN)
reg.m.find(filetype)
click(reg.m.getLastMatch())
if miro.confirm_download_started(reg, title) == "failed":
self.verificationErrors.append("download failed for imagetype" +str(filetype))
else:
reg.mtb.click("download-cancel.png")
miro.click_source(reg, site)
except:
self.verificationErrors.append("download failed for imagetype" +str(filetype))
finally:
type(Key.ESC) #Close any lingering dialogs
miro.cancel_all_downloads(reg)
miro.delete_site(reg, site)
示例7: test_76
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_76(self):
"""http://litmus.pculture.org/show_test.cgi?id=76 item http auth
1. add the pass protected feed
2. click to download the item
3. enter a few invalid combos, then valid
4. Verify download starts
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://participatoryculture.org/feeds_test/feed1.rss"
feed = "Yah"
term = "fourth test"
title = "Video 4"
BAD_PASSW = {"auser":"apassw",
"12341234":"12341234",
" ": " ",
" ":"password",
"username": " "
}
miro.remove_http_auth_file(reg)
#add feed and download 4th item
miro.add_feed(reg, url,feed)
miro.tab_search(reg, term)
reg.m.click("button_download.png")
for username, passw in BAD_PASSW.iteritems():
miro.http_auth(reg, username,passw)
miro.http_auth(reg, username="tester", passw="pcfdudes")
time.sleep(5)
miro.confirm_download_started(reg, title)
#cleanup
miro.delete_feed(reg, feed)
if miro.remove_http_auth_file(reg) == False:
self.fail("auth file not saved on filesystem")
示例8: test_193
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_193(self):
"""http://litmus.pculture.org/show_test.cgi?id=193 torrent direct dl.
1. Add clearbits.net page as a source
2. click to dl the torrent file
3. Verify file starts to download
4. Cleanup
"""
site_url = "http://www.clearbits.net/torrents/662-here-be-dragons-ipod"
site = "ClearBits"
title = "Dragons"
reg = MiroRegions()
miro = MiroApp()
miro.cancel_all_downloads(reg)
miro.add_source(reg, site_url,site)
miro.click_source(reg, site)
reg.m.click("Torrent file")
miro.confirm_download_started(reg, title)
miro.cancel_all_downloads(reg)
miro.delete_site(reg, site)
示例9: test_719
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_719(self):
"""http://litmus.pculture.org/show_test.cgi?id=719 external torrent dl from browser
1. clearbits torrent dl
2. open with browser
3. Verify download started and metadata
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
url = "http://www.clearbits.net/get/993-wurlitztraction---lucidity-cue.torrent"
item_title = "Enough"
miro.browser_to_miro(reg, url)
print ("confirm download started")
status = miro.confirm_download_started(reg, item_title)
print status
if status == "downloaded":
miro.delete_items(reg, item_title,"Misc")
elif status == "in_progress":
miro.delete_items(reg, item_title,"Downloading")
else:
self.fail("Can not confirm download started")
示例10: test_122
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import confirm_download_started [as 别名]
def test_122(self):
"""http://litmus.pculture.org/show_test.cgi?id=122 item click actions, normal view.
1. add 3-blip-videos feed
2. download the Joo Joo
3. verify varios item click scenerios
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://pculture.org/feeds_test/3blipvideos.xml"
feed = "ThreeBlip"
title1 = "The Joo"
title2 = "York"
title3 = "Accessing"
miro.delete_feed(reg, feed)
miro.open_prefs(reg)
prefs = PreferencesPanel()
podcasts_tab = prefs.open_tab("Podcasts")
podcasts_tab.autodownload_setting("Off")
podcasts_tab.default_view_setting("Standard")
podcasts_tab.close_prefs()
#add feed and download joo joo item
miro.add_feed(reg, url,feed)
miro.tab_search(reg, title1)
if reg.m.exists("button_download.png",10):
click(reg.m.getLastMatch())
miro.click_podcast(reg, feed)
miro.tab_search(reg, title2,confirm_present=True)
#double-click starts download
doubleClick(title2)
if miro.confirm_download_started(reg, title=title2) == "in_progress":
miro.log_result("122","normal view double-click starts download")
else:
self.fail("normal view double-click starts download, failed")
#double-click pauses download
miro.click_podcast(reg, feed)
doubleClick(title2)
if exists("item-renderer-download-resume.png"):
miro.log_result("122","normal view double-click pauses download")
else:
self.fail("normal view double-click pause download, failed")
#double-click resumes download
doubleClick(title2)
if exists("item-renderer-download-pause.png"):
miro.log_result("122","normal view double-click resume download")
else:
self.fail("normal view double-click resume download, failed")
#double-click starts playback
miro.wait_for_item_in_tab(reg, tab="Videos",item=title1)
miro.click_podcast(reg, feed)
miro.tab_search(reg, title1)
doubleClick(title1)
if exists(Pattern("playback_bar_video.png")):
miro.log_result("122","normal view double-click starts playback")
else:
self.fail("normal view double-click start playback, failed")
miro.verify_video_playback(reg)
#single click thumb starts download
miro.tab_search(reg, title3)
if reg.m.exists("thumb-default-video.png"):
print "using default thumb"
click(reg.m.getLastMatch())
else:
print "can't find thumb, best guess"
reg.m.find(title1)
click(reg.m.getLastMatch().left(50))
if miro.confirm_download_started(reg, title=title3) == "in_progress":
miro.log_result("122","normal view click starts download")
else:
self.fail("normal view double-click starts download, failed")
#single click thumb starts playback
miro.click_podcast(reg, feed)
miro.tab_search(reg, title1)
if reg.m.exists("thumb-default-video.png"):
print "using default thumb"
click(reg.m.getLastMatch())
elif reg.m.exists("thumb-joojoo.png"):
print "found joo joo thumb"
click(reg.m.getLastMatch())
else:
print "can't find thumb, best guess"
reg.m.find(title1)
click(reg.m.getLastMatch().left(50))
if exists("playback_bar_video.png"):
miro.log_result("122","normal view double-click starts playback")
else:
self.fail("normal view double-click start playback, failed")
miro.verify_video_playback(reg)
#cleanup
miro.delete_feed(reg, feed)