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 = mirolib.AppRegions() # 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") mirolib.confirm_download_started(self,reg,item_title) mirolib.wait_for_item_in_tab(self,reg,"videos",item_title) if reg.m.exists(item_title,3): mirolib.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: mirolib.convert_file(self,reg,x) time.sleep(2) mirolib.click_sidebar_tab(self,reg,"Converting") mirolib.wait_conversions_complete(self,reg,item_title,x) # 3. Verify playback mirolib.click_sidebar_tab(self,reg,"music") aplaybackList = ("MP3",) for x in aplaybackList: mirolib.tab_search(self,reg,"Converted to "+str(x),False) if reg.m.exists(Pattern("item_play_unplayed.png")): doubleClick(reg.m.getLastMatch()) mirolib.verify_audio_playback(self,reg,"Converted") else: self.fail("converted item not found") except FindFailed, debugging: self.verificationErrors.append(debugging)
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 = mirolib.AppRegions() time.sleep(5) url = "http://pculture.org/feeds_test/3blipvideos.xml" feed = "ThreeBlip" title = "The Joo" new_type = "Music" #Set Global Preferences prefs.set_item_display(self,reg,option="audio",setting="on") time.sleep(2) prefs.set_item_display(self,reg,option="video",setting="on") time.sleep(2) prefs.set_autodownload(self,reg,setting="Off") time.sleep(2) #start clean mirolib.delete_feed(self,reg,feed) #add feed and download joo joo item mirolib.add_feed(self,reg,url,feed) mirolib.tab_search(self,reg,title) if reg.m.exists("button_download.png",10): click(reg.m.getLastMatch()) mirolib.wait_for_item_in_tab(self,reg,"Videos",item=title) reg.m.click(title) time.sleep(2) mirolib.edit_item_type(self,reg,new_type) #locate item in audio tab and verify playback mirolib.wait_for_item_in_tab(self,reg,tab="Music",item=title) doubleClick(reg.m.getLastMatch()) mirolib.verify_audio_playback(self,reg,title) #cleanup mirolib.delete_feed(self,reg,feed)