当前位置: 首页>>代码示例>>Python>>正文


Python MiroApp.wait_for_item_in_tab方法代码示例

本文整理汇总了Python中myLib.miro_app.MiroApp.wait_for_item_in_tab方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.wait_for_item_in_tab方法的具体用法?Python MiroApp.wait_for_item_in_tab怎么用?Python MiroApp.wait_for_item_in_tab使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在myLib.miro_app.MiroApp的用法示例。


在下文中一共展示了MiroApp.wait_for_item_in_tab方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_458

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [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)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:34,代码来源:sg58_items.py

示例2: test_441

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [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)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:60,代码来源:sg58_items2.py

示例3: test_728

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [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)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:58,代码来源:sg58_items2.py

示例4: test_24

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [as 别名]
    def test_24(self):
        """http://litmus.pculture.org/show_test.cgi?id=24 edit remembered 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 = "Face"
        title = "Flip"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        miro.set_podcast_autodownload(reg, setting="All")
        #2. search
        miro.tab_search(reg, term)
        self.assertTrue(reg.m.exists(title))

        url2 = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed2 = "Static"
        term2 = "FilmWeek"
        miro.add_feed(reg, url2,feed2)
        miro.tab_search(reg, "Brooklyn")
        miro.wait_for_item_in_tab(reg, "Videos",title)
        reg.m.click(title)
        type(Key.ENTER)
        time.sleep(2)
        type(" ")
        self.assertTrue(exists("playback_controls.png"))
        miro.shortcut("d")

        reg.s.click(feed2)
        self.assertTrue(reg.mtb.exists("BROOKLYN"))
        miro.tab_search(reg, term2)
        reg.mtb.click("button_save_as_podcast.png")

        miro.click_last_podcast(reg)
        miro.tab_search(reg, term2,confirm_present=True)
        miro.clear_search(reg)
        time.sleep(3)
        if not reg.mtb.exists(term2.upper()):
            miro.log_result("324","test_24",status="pass")
       

        #4. cleanup
        miro.delete_feed(reg, "stupid")
        miro.click_last_podcast(reg)
        miro.delete_current_selection(reg)
        miro.delete_feed(reg, "Static List")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:57,代码来源:sg42_feedsearch.py

示例5: test_657

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_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()
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:53,代码来源:sg58_items2.py

示例6: test_361

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [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)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:52,代码来源:sg58_items.py

示例7: test_620

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_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)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:52,代码来源:sg72_conversions.py

示例8: test_364

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [as 别名]
    def test_364(self):
        """http://litmus.pculture.org/show_test.cgi?id=364 edit item misc to video

        1. Download item that lands in Misc
        2. Edit type to video
        3. start playback and verify play external dialog
        4. cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://vimeo.com/moogaloop_local.swf?clip_id=7335370&server=vimeo.com"
        title = "local"
        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_videos_in_videos("on")
        general_tab.close_prefs()
        miro.cancel_all_downloads(reg)
        reg.tl.click("File")
        reg.tl.click("Download from")
        time.sleep(4)
        type(url)
        time.sleep(10)
        type("\n")
        if reg.s.exists("Downloading"):
            print "item dl started"
            reg.s.waitVanish("Downloading",120)
            time.sleep(5)
        miro.wait_for_item_in_tab(reg, tab="Misc",item=title)
        x = reg.m.find(title)
        click(x)
        reg.s.find("Music")
        tmpr = Region(reg.s.getLastMatch().above())
        tmpr.setW(tmpr.getW()+80)
        tmpr.setX(tmpr.getX()-20)
        y = tmpr.find("Videos")
        dragDrop(x,y)
        #locate item in video tab and verify playback
        click(y)
        if reg.m.exists(title):
            doubleClick(reg.m.getLastMatch())
            miro.verify_video_playback(reg)
            miro.delete_items(reg, title,"Videos")
        else:
            miro.delete_items(reg, title,"Videos")
            self.fail("item not found in videos tab")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:51,代码来源:sg58_items.py

示例9: test_363

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [as 别名]
    def test_363(self):
        """http://litmus.pculture.org/show_test.cgi?id=363 edit item metadata

        1. add Static List feed
        2. download the Earth Eats item
        3. Edit item metadata
        4. Verify item played as audio item

        """
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Earth Eats"
        title = "Mushroom" 
        new_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.close_prefs()

        
        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=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")
        miro.edit_item_metadata(reg, meta_field="about",meta_value="hoovercraft full of eels")
        miro.tab_search(reg, "hoovercraft eels")
        if not reg.m.exists(title):
            self.fail("can not verify description edited")
        miro.delete_feed(reg, feed)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:44,代码来源:sg58_items.py

示例10: test_339

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [as 别名]
    def test_339(self):
        """http://litmus.pculture.org/show_test.cgi?id=339 delete feed with dl items.

        Litmus Test Title:: 339 - channels delete a feed with downloaded items
        Description: 
        1. Add the 2-stupid-videos feed, and download both items in the feed.  
        2. Remove Feed and Keep the videos.  
        3. Verify videos are displayed in the non-feed section of the Library
        4. Cleanup
        """

        
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()

        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"

        #1. Add the feed and start dl
        miro.add_feed(reg, url,feed)
        time.sleep(3)
        miro.toggle_normal(reg)
#       miro.count_images(reg,  "item-context-button.png",region="mainright",num_expected=2)
        miro.set_podcast_autodownload(reg, setting="All")
        miro.wait_for_item_in_tab(reg, "videos","Flip")
        miro.wait_for_item_in_tab(reg, "videos","Dinosaur")
        miro.click_podcast(reg, feed)
        type(Key.DELETE)
        miro.remove_confirm(reg, action="keep")
        miro.click_sidebar_tab(reg, "videos")
        miro.tab_search(reg, "Flip",confirm_present=True)
        miro.tab_search(reg, "Dinosaur",confirm_present=True)
        #4. cleanup
        miro.delete_items(reg, "Flip","videos")
        miro.delete_items(reg, "Dinosaur","videos")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:38,代码来源:sg6_feeds.py

示例11: test_362

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [as 别名]
    def test_362(self):
        """http://litmus.pculture.org/show_test.cgi?id=362 edit item music to video

        1. add Feed
        2. download Paris mp3
        3. Edit item from Audio to Video
        4. Verify item played as video item

        """
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/MixedCats.xml"
        feed = "MIXED"
        term = "Paris"
        title = "Laren"
        new_type = "Video"
        old_type = "Music"
        #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()

        
        #add feed and download joo joo item
        miro.add_feed(reg, url,feed)
        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")
        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="Video",item=title)
        reg.m.doubleClick(title)
        miro.verify_video_playback(reg)
        miro.quit_miro()
        miro.restart_miro()
        miro.wait_for_item_in_tab(reg, tab="Video",item=title)
        #cleanup
        miro.delete_feed(reg, feed)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:50,代码来源:sg58_items.py

示例12: test_122

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [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)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:100,代码来源:sg58_items.py

示例13: test_725

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import wait_for_item_in_tab [as 别名]
    def test_725(self):
        """http://litmus.pculture.org/show_test.cgi?id=725 item click actions, list 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)
        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        podcasts_tab = prefs.open_tab("Podcasts")
        podcasts_tab.autodownload_setting("Off")
        podcasts_tab.default_view_setting("List")
        podcasts_tab.close_prefs()
        

        time.sleep(2)      
        #add feed and download joo joo item
        miro.add_feed(reg, url,feed)
        miro.tab_search(reg, title1)
        #double-click starts download
        reg.m.find(title1)
        title_loc = reg.m.getLastMatch()
        doubleClick(title_loc)
        if reg.m.exists("video-download-pause.png"):
            miro.log_result("122","list view double-click starts download")
        else:
            self.fail("list view double-click starts download, failed")
        #double-click pauses download
        doubleClick(title_loc)
        if reg.m.exists("video-download-resume.png"):
            miro.log_result("122","list view double-click pauses download")
        else:
            self.fail("list view double-click pause download, failed")
        #double-click resumes download
        doubleClick(title_loc)
        if exists("video-download-pause.png"):
            miro.log_result("122","list view double-click resumes download")
        else:
            self.fail("list 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","list view double-click starts playback")
        else:
            self.fail("list view double-click start playback, failed")
        miro.verify_video_playback(reg)
        #cleanup
        miro.delete_feed(reg, feed)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:64,代码来源:sg58_items2.py


注:本文中的myLib.miro_app.MiroApp.wait_for_item_in_tab方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。