本文整理汇总了Python中myLib.miro_app.MiroApp.click_sidebar_tab方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.click_sidebar_tab方法的具体用法?Python MiroApp.click_sidebar_tab怎么用?Python MiroApp.click_sidebar_tab使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.click_sidebar_tab方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_225
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_225(self):
"""http://litmus.pculture.org/show_test.cgi?id=225 add several items to a new playlist.
1. add a watched folder to get some items in the db
2. select the items and create a new playlist from menu
3. verify items in list
4. repeat with context menu and verify
"""
watched_feed = "TestData"
playlist = "MIX LIST"
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Podcasts")
miro.toggle_normal(reg)
miro.tab_search(reg, watched_feed)
reg.m.click(Pattern("sort_name_normal.png"))
item_list = ["Lego", "Pancake", "Deerhunter"]
keyDown(Key.SHIFT)
time.sleep(1)
reg.m.click("Lego")
reg.m.click("Deerhunter")
keyUp(Key.SHIFT)
miro.add_playlist(reg, playlist,style="shortcut")
miro.toggle_normal(reg)
for title in item_list:
miro.tab_search(reg, title,confirm_present=True)
示例2: test_23
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_23(self):
"""http://litmus.pculture.org/show_test.cgi?id=23 remember search.
1. Add 2-stupid-videos feed
2. Perform a search
3. Type in search box the delete key
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
url = "http://pculture.org/feeds_test/2stupidvideos.xml"
feed = "TWO STUPID"
term = "House"
title = "Dinosaur"
#1. add feed
miro.add_feed(reg, url,feed)
#2. search
miro.tab_search(reg, term)
self.assertTrue(reg.m.exists(title))
self.assertFalse(reg.m.exists("Flip"))
miro.click_sidebar_tab(reg, "Videos")
reg.s.click(feed)
self.assertTrue(reg.mtb.exists(term.upper()))
self.assertTrue(reg.m.exists(title))
self.assertFalse(reg.m.exists("Flip"))
#4. cleanup
miro.delete_feed(reg, "stupid")
示例3: test_6
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_6(self):
"""http://litmus.pculture.org/show_test.cgi?id=6 add feed from MiroGuide.
1. Open Miro
2. search for a feed and add it.
3. Verify feed added
4. Cleanup
"""
setAutoWaitTimeout(60)
pass
#set the search regions
reg = MiroRegions()
miro = MiroApp()
feed = "Studio"
search = "Studio sketch"
try:
miro.click_sidebar_tab(reg, "Miro")
time.sleep(5)
gr = Region(reg.mtb)
gr.setH(300)
gr.click(Pattern("guide_search.png"))
type(search +"\n")
time.sleep(5)
reg.m.find(Pattern("add_feed.png"))
click(reg.m.getLastMatch())
time.sleep(5)
miro.click_podcast(reg, feed)
finally:
#4. cleanup
miro.delete_feed(reg, feed)
示例4: test_173
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_173(self):
"""http://litmus.pculture.org/show_test.cgi?id=173 1st time install, search everywhere
Litmus Test Title:: 173 - 1st time install, search everywhere
Description:
1. Clean up Miro support and vidoes directories
2. Launch - walk through 1st tieme install dialog and search everywhere
"""
miro = MiroApp()
miro.quit_miro()
myLib.config.delete_database_and_prefs()
myLib.config.delete_miro_video_storage_dir()
#set the search regions
miro.restart_miro()
search_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
miro.first_time_startup_dialog(lang="Default",
run_on_start="No",
search="Yes",
search_path="Everywhere",
itunes="No")
time.sleep(10)
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Videos")
find(Pattern("sort_name_normal.png"))
doubleClick(getLastMatch().below(100))
miro.verify_video_playback(reg)
示例5: test_236
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_236(self):
"""http://litmus.pculture.org/show_test.cgi?id=236 startup, corrupt item_info_cache
Litmus Test Title:: 236 - rebuild item_info_cache on startup.
Description:
1. Clean up Miro support and vidoes directories
2. Launch - walk through 1st tieme install dialog and search everywhere
"""
reg = MiroRegions()
miro = MiroApp()
folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
miro.add_watched_folder(reg, folder_path)
miro.quit_miro()
myLib.config.delete_preferences()
setAutoWaitTimeout(myLib.testvars.timeout)
#set the search regions
miro.restart_miro()
miro.first_time_startup_dialog(lang="Default",run_on_start="No",search="No",search_path=None,itunes="No")
waitVanish("Preparing")
time.sleep(10)
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Videos")
miro.tab_search(reg, title="Deerhunter",confirm_present=True)
示例6: test_444
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_444(self):
"""http://litmus.pculture.org/show_test.cgi?id=444 external dl errors.
1. http file url to download
2. open with File Download menu
3. Verify download completes
4. Check title display via screenshot
"""
item_url = "http://www.youtube.com/watch?v=LU-ZQWZSGfc&feature=fvhr"
item_title = "watch"
reg = MiroRegions()
miro = MiroApp()
miro.cancel_all_downloads(reg)
dl_status = miro.download_from_a_url(reg, item_url, item_title)
print dl_status
self.assertTrue(dl_status == "failed")
miro.quit_miro()
miro.restart_miro()
miro.click_sidebar_tab(reg, "Downloading")
assert reg.m.exists(Pattern("file_not_found.png"))
reg.m.click(item_title)
type(Key.DELETE)
miro.click_sidebar_tab(reg, "Videos")
reg.s.waitVanish("Downloading")
示例7: test_709
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_709(self):
"""http://litmus.pculture.org/show_test.cgi?id=709 create playlist from library search.
1. add a watched folder to get some items in the db
2. search in music tab
3. click Add to Playist button
4. accept name and verify created
"""
watched_feed = "TestData"
playlist = "Johnson"
item_list = ["Pancakes","Horizon"]
reg = MiroRegions()
miro = MiroApp()
p = miro.get_podcasts_region(reg)
miro.click_sidebar_tab(reg, "Music")
miro.tab_search(reg, playlist)
reg.mtb.click(Pattern("button_save_as_playlist.png"))
time.sleep(3)
type(Key.ENTER)
miro.click_playlist(reg, playlist.upper())
miro.toggle_normal(reg)
for title in item_list:
miro.tab_search(reg, title,confirm_present=True)
示例8: test_5
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_5(self):
"""http://litmus.pculture.org/show_test.cgi?id=5 update install.
Litmus Test Title:: 5 - upgrade from an earlier version of miro (3.5.1)
Description:
1. Copy in Miro 3.5.1 database
2. Launch miro and verify it is upgraded to current version.
"""
miro = MiroApp()
miro.quit_miro()
db = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","databases","351sqlitedb")
myLib.config.replace_database(db)
#set the search regions
miro.restart_miro()
waitVanish("Upgrading")
waitVanish("Preparing")
time.sleep(10)
miro.handle_crash_dialog('5', db=False, test=False)
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Downloading")
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
示例9: test_657
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_657(self):
"""http://litmus.pculture.org/show_test.cgi?id=657 edit multiple fields
1. add Static List feed
2. download the Earth Eats item
3. Edit item metadata
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://ringtales.com/nyrss.xml"
feed = "The New"
title = "Cat"
new_metadata_list = [
["show","Animated Cartoons", "658"],
["episode_id","nya", "670"],
["season_no","25", "671"],
["episode_no","43", "672"],
["video_kind","Clip", "652"],
]
try:
#start clean
miro.delete_feed(reg, feed)
#add feed and download earth eats 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, "Videos",item=title)
miro.click_podcast(reg, feed)
miro.tab_search(reg, title)
reg.m.click(title)
miro.edit_item_video_metadata_bulk(reg, new_metadata_list)
time.sleep(2)
miro.click_sidebar_tab(reg, "Videos")
miro.tab_search(reg, title)
reg.mtb.click("Clip")
if reg.m.exists(title):
reg.mtb.click("All")
else:
self.fail("item not found in Clips filter")
finally:
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
示例10: test_322
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_322(self):
"""http://litmus.pculture.org/show_test.cgi?id=322 search and save as a podcast
1. Perform a search
2. Click off the tab
3. Click back and verify the search is remembered.
4. Cleanup
"""
setAutoWaitTimeout(60)
reg = MiroRegions()
miro = MiroApp()
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
podcasts_tab = prefs.open_tab("Podcasts")
podcasts_tab.autodownload_setting("Off")
podcasts_tab.close_prefs()
searches = {"blip": "python",
"YouTube": "cosmicomics",
"Revver": "Beiber",
"Yahoo": "Canada",
"DailyMotion": "Russia",
"Metavid": "africa",
"Mininova": "Creative Commons",
"Goog": "Toronto"}
for engine, term in searches.iteritems():
miro.click_sidebar_tab(reg, "search")
miro.search_tab_search(reg, term, engine)
time.sleep(10)
reg.mtb.click("button_save_as_podcast.png")
if engine == "blip":
saved_search = engine
else:
saved_search = engine +" for"
time.sleep(10) #give some time for everything to load up
miro.click_podcast(reg, saved_search)
miro.shortcut("r")
time.sleep(5)
miro.get_podcasts_region(reg)
miro.tab_search(reg, term)
try:
self.assertTrue(reg.m.exists(engine))
miro.delete_feed(reg, engine)
except:
miro.log_result("322","test 322, failed for " +engine+": "+term, status="fail")
#cleanup
for x in searches.keys():
miro.delete_feed(reg, x)
示例11: test_620
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [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)
示例12: test_108
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_108(self):
"""http://litmus.pculture.org/show_test.cgi?id=108 playback through unplayed items.
1. add a feed url feed of small items
2. download a few items
3. verify unplayed - playback through list
4. verify marked as unplayed.
"""
url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ShortCats.xml")
url = "file:///"+url_path
feed = "Short Cats"
## url = "http://qa.pculture.org/feeds_test/2stupidvideos.xml"
## feed = "TWO STUPID"
reg = MiroRegions()
miro = MiroApp()
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
playback_tab = prefs.open_tab("Playback")
playback_tab.play_continuous("on", "Podcast")
playback_tab.close_prefs()
miro.add_feed(reg, url, feed)
miro.set_podcast_autodownload(reg, setting="All")
time.sleep(15)
miro.set_podcast_autodownload(reg, setting="Off")
if reg.s.exists("Downloading"):
reg.s.waitVanish("Downloading")
miro.click_sidebar_tab(reg, "Videos")
miro.toggle_normal(reg)
reg.m.wait("item_play_unplayed.png")
if reg.m.exists("item_play_unplayed.png"):
find(Pattern("sort_name_normal.png"))
doubleClick(getLastMatch().below(100))
wait(Pattern("playback_bar_video.png"),15)
else:
self.fail("no unplayed badges found")
if exists(Pattern("playback_bar_video.png")):
print "playback started"
time.sleep(60)
waitVanish(Pattern("playback_bar_video.png"))
if reg.m.exists("item_play_unplayed.png"):
self.fail("items not marked as unplayed")
示例13: test_54
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_54(self):
"""http://litmus.pculture.org/show_test.cgi?id=54 Test Crash Reporter no DB.
1. Perform a search of crash inducing text
2. Submit crash dialog
3. Quit Miro
"""
print self.id()
setAutoWaitTimeout(60)
reg = MiroRegions()
miro = MiroApp()
term ="LET'S TEST DTV'S CRASH REPORTER TODAY"
miro.click_sidebar_tab(reg, "Search")
miro.search_tab_search(reg, term)
miro.handle_crash_dialog( '54', db=False, test=True)
示例14: test_55
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_55(self):
"""http://litmus.pculture.org/show_test.cgi?id=55 Test Crash Reporter with DB.
1. Perform a search of crash inducing text
2. Submit crash dialog with db
3. Quit Miro
"""
setAutoWaitTimeout(60)
reg = MiroRegions()
miro = MiroApp()
term ="LET'S TEST DTV'S CRASH REPORTER TODAY"
miro.click_sidebar_tab(reg, "Search")
miro.search_tab_search(reg, term)
miro.handle_crash_dialog( '55', test=True)
miro.search_tab_search(reg, term=" ",engine=None)
示例15: test_123
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import click_sidebar_tab [as 别名]
def test_123(self):
"""http://litmus.pculture.org/show_test.cgi?id=123 add feed more than once.
Litmus Test Title:: 123 - add a channel more than once
Description:
1. Add a channel from the Miro Guide.
2. Copy the URL and use the Add Feed dialog to add it.
3. Verify feed not duplicated.
4. Cleanup
"""
#set the search regions
reg = MiroRegions()
miro = MiroApp()
feed = "EEVblog"
miro.click_sidebar_tab(reg, "Miro")
gr = Region(reg.mtb)
gr.setH(300)
miro.click_sidebar_tab(reg, "Miro")
gr.click(Pattern("guide_search.png"))
type(feed + "\n")
time.sleep(10)
reg.m.find(Pattern("add_feed.png"))
click(reg.m.getLastMatch())
time.sleep(20)
miro.click_last_podcast(reg)
time.sleep(5)
#2. Copy the url and attempt to add it
reg.t.click("Sidebar")
tmpr = Region(reg.t.getLastMatch().below())
tmpr.setW(tmpr.getW()+200)
tmpr.highlight(3)
if tmpr.exists("Copy") or tmpr.exists("URL"):
click(tmpr.getLastMatch())
time.sleep(2)
miro.shortcut("n")
time.sleep(2)
type(Key.ENTER)
#3. Verify feed not duplicated
p = miro.get_podcasts_region(reg)
time.sleep(2)
miro.count_images(reg, img=feed,region="sidebar",num_expected=1)
miro.delete_feed(reg, feed)