本文整理汇总了Python中myLib.miro_app.MiroApp.tab_search方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.tab_search方法的具体用法?Python MiroApp.tab_search怎么用?Python MiroApp.tab_search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.tab_search方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_23
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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")
示例2: test_225
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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)
示例3: test_720
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_720(self):
"""http://litmus.pculture.org/show_test.cgi?id=720 Menu New Search Feed.
1. Add list of guide feeds (Static List)
2. Search in the tab
3. From Sidebar -> New Search feed, create saved search channel
4. Verify Search saved
5. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
feed = "Static"
term = "Voice"
#1. add feed
miro.add_feed(reg, url,feed)
miro.tab_search(reg, term)
#2. search
miro.new_search_feed(reg, term, radio="Podcast", source=feed, defaults=True)
#3. verify search saved
miro.click_last_podcast(reg)
self.assertTrue(reg.m.exists(term, 45))
#4. cleanup
miro.click_remove_podcast(reg)
miro.remove_confirm(reg, action="remove")
miro.delete_feed(reg, "Static List")
示例4: test_215
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_215(self):
"""http://litmus.pculture.org/show_test.cgi?id=215 Feed search, saved search feed
1. Add list of guide feeds (Static List)
2. Perform a search and save it.
3. Verify Search saved
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
feed = "Static"
term = "Gimp"
title = "GimpKnowHow"
#1. add feed
miro.add_feed(reg, url, feed)
#2. search
miro.tab_search(reg, term)
reg.mtb.click("button_save_as_podcast.png")
#3. verify search saved
miro.click_last_podcast(reg)
#4. cleanup
type(Key.DELETE)
#Last chance to verify Gimp is the saved search feed.
self.assertTrue(reg.m.exists("GIMP"),5)
miro.remove_confirm(reg, action="remove")
miro.delete_feed(reg, "Static List")
miro.handle_crash_dialog('215', db=False, test=False)
示例5: test_709
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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)
示例6: test_721
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_721(self):
"""http://litmus.pculture.org/show_test.cgi?id=721 Menu New Search Watched
1. Add list of guide feeds (Static List)
2. From Sidebar -> New Search feed, create saved search channel
3. Verify Search saved
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
feed = "TestData"
term = "monkey"
folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","WatchTest")
#1. add feed
miro.add_watched_folder(reg, folder_path)
if reg.s.exists("WatchTest"):
miro.log_result("678","test_721")
#2. search
miro.tab_search(reg, term)
miro.new_search_feed(reg, term,radio="Podcast",source=feed,watched=True)
#Remove Watched Folder
miro.open_prefs(reg)
prefs = PreferencesPanel()
folder_tab = prefs.open_tab("Folders")
folder_tab.remove_watched_folder("ArtTest")
folder_tab.close_prefs()
示例7: test_458
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_458(self):
"""http://litmus.pculture.org/show_test.cgi?id=458 edit blank item description
1. add TWO STUPID feed
2. download the Flip Faceitem
3. Edit item description
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://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, "Videos",item=title)
reg.m.click(title)
miro.edit_item_metadata(reg, meta_field="about",meta_value="Blank description edited")
miro.tab_search(reg, "blank description")
if reg.m.exists(title):
miro.log_result("656","test_458")
else:
miro.log_result("656","test_458",status="fail")
#cleanup
miro.delete_feed(reg, feed)
示例8: test_236
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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)
示例9: test_213
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_213(self):
"""http://litmus.pculture.org/show_test.cgi?id=213 Feed search, delete key.
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"
title = "Flip"
term = "dinosaur"
#1. add feed
miro.add_feed(reg, url, feed)
#2. search
miro.tab_search(reg, term)
self.assertFalse(reg.m.exists(title, 5))
reg.mtb.click(term.upper())
for x in range(0,8):
type(Key.LEFT)
for x in range(0,8):
type(Key.DELETE)
self.assertTrue(reg.m.exists(title))
#4. cleanup
miro.delete_feed(reg, feed)
示例10: test_214
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_214(self):
"""http://litmus.pculture.org/show_test.cgi?id=214 Feed search, search with spaces
1. Add 3 blip videos feed
2. Perform a search with spaces
3. Verify Search saved
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
url = "http://pculture.org/feeds_test/3blipvideos.xml"
feed = "ThreeBlip"
term = "strange creature"
title = "Joo Joo"
#1. add feed
miro.add_feed(reg, url,feed)
#2. search
miro.tab_search(reg, term)
reg.mtb.click("button_save_as_podcast.png")
#3. verify search saved
miro.click_last_podcast(reg)
miro.tab_search(reg, term,confirm_present=True)
#4. cleanup
miro.click_remove_podcast(reg)
miro.remove_confirm(reg, action="remove")
miro.delete_feed(reg, "blip")
miro.delete_feed(reg, feed)
示例11: test_112
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_112(self):
"""http://litmus.pculture.org/show_test.cgi?id=112 download errors
1. Add feed
2. Download All
3. Verify error messages
"""
reg = MiroRegions()
miro = MiroApp()
feed_url = "http://participatoryculture.org/feeds_test/feed13.rss"
feed_name = "Feed"
error_types = {"Server Closes Connection": "no_connection.png",
"File not found": "file_not_found.png",
"503 Error": "no_connection.png",
"Host not found": "unknown_host.png",
"HTTP error": "http_error.png",
"Timeout error": "no_connection.png",
}
miro.add_feed(reg, feed_url, feed_name)
miro.set_podcast_autodownload(reg, setting="All")
time.sleep(10)
for error, image in error_types.iteritems():
miro.tab_search(reg, error)
assert reg.m.exists(Pattern(image).similar(0.6),60)
miro.delete_feed(reg, feed_name)
示例12: test_728
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [as 别名]
def test_728(self):
"""http://litmus.pculture.org/show_test.cgi?id=728 edit metadata for mulitple items
1. add Static List feed
2. download the Earth Eats item
3. Edit item metadata
"""
reg = MiroRegions()
miro = MiroApp()
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.show_audio_in_music("on")
general_tab.close_prefs()
url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
feed = "Static"
term = "Earth Eats"
title = "Mushroom" # item title updates when download completes
new_type = "Video"
edit_itemlist = [
["name", "Earth Day Everyday", "647"],
["artist", "Oliver and Katerina", "648"],
["album", "Barki Barks", "649"],
["genre", "family", "650"],
["track_num" ,"1", "673"],
["track_of" ,"2", "673"],
["year", "2010", "655"],
["rating", "5", "651"],
]
#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, term)
if reg.m.exists("button_download.png",10):
click(reg.m.getLastMatch())
miro.wait_for_item_in_tab(reg, "Music",item=title)
reg.m.find(title)
reg.m.click(title)
reg.mtb.click("tabsearch_clear.png")
for x in edit_itemlist:
miro.edit_item_metadata(reg, meta_field=x[0],meta_value=x[1])
try:
miro.log_result(x[2],"test_647")
finally:
time.sleep(2)
if not miro.tab_search(reg, "Earth Day",confirm_present=True) == True:
self.fail("new title not saved")
#cleanup
miro.delete_feed(reg, feed)
示例13: test_322
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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)
示例14: test_361
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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)
示例15: test_620
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import tab_search [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)