本文整理汇总了Python中myLib.miro_app.MiroApp.add_source方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.add_source方法的具体用法?Python MiroApp.add_source怎么用?Python MiroApp.add_source使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.add_source方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_194
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [as 别名]
def test_194(self):
"""http://litmus.pculture.org/show_test.cgi?id=194 rename source.
1. Add blip.tv as a source
2. rename
3. restart and verify name persists
4. Cleanup
"""
site_url = "http://blip.tv"
site = "blip"
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.click_source(reg, site)
reg.t.click("Sidebar")
reg.t.click("Rename")
time.sleep(3)
type("BLIP TV ROCKS \n")
self.assertTrue(reg.s.exists("BLIP TV ROCKS"))
miro.quit_miro()
reg = MiroRegions()
miro = MiroApp()
self.assertTrue(reg.s.exists("BLIP"))
miro.delete_site(reg, "BLIP")
示例2: stest_39
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [as 别名]
def stest_39(self):
"""http://litmus.pculture.org/show_test.cgi?id=39 site navigation.
#skipping for now will fix later.
1. Add blip.tv as a source
2. navigate through site
3. verify nav buttons and states
4. Cleanup
"""
site_url = "http://blip.tv"
site = "blip"
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.click_source(reg, site)
time.sleep(10)
find("navstop_disabled.png")
find("navforward_disabled.png")
find("navhome.png")
find("navreload.png")
reg.m.click(myLib.testvars.blip_browse)
reg.m.click(myLib.testvars.blip_recent)
self.assertTrue(reg.mtb.exists("navback.png"))
self.assertTrue(reg.mtb.exists("navforward_disabled.png"))
self.assertTrue(reg.mtb.exists("navhome.png"))
self.assertTrue(reg.mtb.exists("navreload.png"))
reg.mtb.click("navback.png")
self.assertTrue(reg.mtb.exists("navforward.png"))
self.assertTrue(reg.mtb.exists("navback_disabled.png"))
self.assertTrue(reg.mtb.exists("navhome.png"))
self.assertTrue(reg.mtb.exists("navreload.png"))
reg.mtb.click("navforward")
self.assertTrue(reg.mtb.exists("navback.png"))
self.assertTrue(reg.mtb.exists("navforward_disabled.png"))
self.assertTrue(reg.mtb.exists("navhome.png"))
self.assertTrue(reg.mtb.exists("navreload.png"))
reg.mtb.click("navreload.png")
reg.mtb.click("navstop.png")
self.assertTrue(reg.mtb.exists("navback.png"))
self.assertTrue(reg.mtb.exists("navforward.png"))
self.assertTrue(reg.mtb.exists("navhome.png"))
self.assertTrue(reg.mtb.exists("navreload.png"))
reg.mtb.click("navhome.png")
#FIX MEwait for the updating icon to appear then disappear
self.assertTrue(reg.mtb.exists("navback.png"))
self.assertTrue(reg.mtb.exists("navforward_disabled.png"))
self.assertTrue(reg.mtb.exists("navhome.png"))
self.assertTrue(reg.mtb.exists("navreload.png"))
miro.delete_site(reg, site)
示例3: test_195
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [as 别名]
def test_195(self):
"""http://litmus.pculture.org/show_test.cgi?id=196 delete site.
1. Add header test as a source
2. delete it
"""
site_url = "http://qa.pculture.org/feeds_test/header-test.php"
site = "Header Test"
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.delete_site(reg, site)
示例4: skip_192
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [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)
示例5: test_191
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [as 别名]
def test_191(self):
"""http://litmus.pculture.org/show_test.cgi?id=191 Add rss feed to sidebar.
1. Add ClearBits.net as a source
2. Open Netlabel Music page and add RSS feed
3. Verify feed added to the sidebar
4. Cleanup
"""
site_url = "http://clearbits.net"
site = "ClearBits"
feed = "ClearBits"
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.click_source(reg, site)
reg.m.click("Netlabel Music")
reg.m.click(myLib.testvars.clearbits_rss)
miro.click_podcast(reg, site)
miro.log_result("29","test_191 verify 1-click add site from source.")
time.sleep(3)
miro.delete_feed(reg, feed)
miro.delete_site(reg, site)
示例6: test_143
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [as 别名]
def test_143(self):
"""http://litmus.pculture.org/show_test.cgi?id=143 multiple delete and cancel.
1. Add clearbits and archive.org
2. select bogh and delete, the cancel
3. verify sites not deleted.
4. Cleanup
"""
site_url = "http://clearbits.net"
site_url2 = "http://archive.org"
site = "ClearBits"
site2 = "Internet"
setAutoWaitTimeout(60)
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.add_source(reg, site_url2,site2)
p = miro.get_sources_region(reg)
p.click(site)
keyDown(Key.SHIFT)
p.click(site2)
keyUp(Key.SHIFT)
if reg.m.exists("Delete All",5) or \
reg.m.exists(Pattern("button_mv_delete_all.png"),5):
click(reg.m.getLastMatch())
else:
self.fail("Delete All button for multi-select not found")
miro.remove_confirm(reg, "cancel")
time.sleep(3)
p = miro.get_sources_region(reg)
time.sleep(3)
self.assertTrue(p.exists(site))
self.assertTrue(p.exists(site2))
#Cleanup
miro.delete_site(reg, site)
miro.delete_site(reg, site2)
示例7: test_193
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_source [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)