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


Python MiroApp.shortcut方法代码示例

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


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

示例1: test_24

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import shortcut [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

示例2: test_322

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

示例3: test_123

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

示例4: test_138

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import shortcut [as 别名]
    def test_138(self): #shortened as there no more feed counter and can't count too much stuff.
        """http://litmus.pculture.org/show_test.cgi?id=138 clear out old items.

        Litmus Test Title:: 138 Channels - clear out old items 
        Description: 
         1. Add a feed that adds five new items each time it's updated.
         2. Update the feed to add new items.
         3. Modify old items settings to verify items cleared.
         4. Cleanup

        """
        
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()        
        url = "http://bluesock.org/~willg/cgi-bin/newitemsfeed.cgi"
        feed = "my feed"
        miro.add_feed(reg, url,feed)
        miro.get_podcasts_region(reg)

        
        miro.tab_search(reg, "my feed")
        miro.toggle_list(reg)
        
        miro.count_images(reg, img="my feed",region="list",num_expected=5)
        miro.click_podcast(reg, feed)
        miro.shortcut("r")
        time.sleep(10)
        miro.get_podcasts_region(reg)
        if miro.count_images(reg, img="my feed",region="list",num_expected=10) == 10:
            miro.log_result("99","test_92") #verifies update podcast shortcut
        miro.click_podcast(reg, feed)
        for x in range(0,3):
            miro.shortcut("r")
            time.sleep(3)
        miro.open_podcast_settings(reg)
        miro.change_podcast_settings(reg, option="Podcast Items",setting="Keep 0")
        time.sleep(2)
        miro.get_podcasts_region(reg)
        miro.count_images(reg, img="my feed",region="list",num_expected=5)
        #4. cleanup
        miro.delete_feed(reg, "my feed") 
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:44,代码来源:sg6_feeds.py

示例5: test_79

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import shortcut [as 别名]
    def test_79(self):
        """http://litmus.pculture.org/show_test.cgi?id=79 Search - New Search Podcast: Engine
        Steps to Perform:

        1.  Select Sidebar -> New Search Podcast
        2.  Enter a search term
        3.  Select the Search Engine radio button
        4.  Select a search engine from the pulldown menu
        5.  Select Create Podcast
        """

        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 = { "Yahoo": "Canada", "DailyMotion": "Ontario", "YouTube": "toronto"}
        radio = "Search"
        for source, term in searches.iteritems():
            miro.new_search_feed(reg, term,radio,source,defaults=False,watched=False)
            time.sleep(10) #give some time for everything to load up
            miro.click_podcast(reg, source)
            miro.shortcut("r")
            time.sleep(5)
            miro.tab_search(reg, term)
            try:
                self.assertTrue(reg.m.exists(source))
                miro.delete_feed(reg, source)
            except:
                 miro.log_result("79","test_79, failed for " +source+": "+term, status="fail")
        
        #cleanup
        for x in searches.keys():
            miro.delete_feed(reg, x)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:41,代码来源:sg2_search.py

示例6: test_160

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

        1. File -> Open
        2. Select video file on system
        3. Verify playback starts and item added to Library
        4. Cleanup - just remove from Library
        """
        
        reg = MiroRegions() 
        miro = MiroApp()

        
        try:
        
            vid_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","monkey.flv")
            miro.shortcut('o')
            miro.type_a_path(vid_path)
            time.sleep(3)
            self.assertTrue(exists(Pattern("playback_controls.png")))
            miro.shortcut("d")
        finally:
            type(Key.ESC)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:25,代码来源:sg31_playback.py

示例7: test_7

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import shortcut [as 别名]
    def test_7(self):
        """http://litmus.pculture.org/show_test.cgi?id=7 add feed.

        1. Open Ryan is Hungry
        2. click one-click link
        3. Verify feed added
        4. Cleanup
        """
        
        reg = MiroRegions() 
        miro = MiroApp()
        feed = "Ryan"
        try:
            url = "http://ryanishungry.com/subscribe/"
            switchApp(miro.open_ff())
            if reg.t.exists("Firefox",45):
                click(reg.t.getLastMatch())
            miro.shortcut("l")
            time.sleep(2)
            type(url + "\n")
            time.sleep(20)
            if miro.os_name == "osx":
                self.shortcut('f', shift=True)
            else:
                type(Key.F11)
            
            find(ONE_CLICK_BADGE)
            click(ONE_CLICK_BADGE)
            time.sleep(25)
            miro.close_ff()
                        
            #Start Miro    
            miro.close_one_click_confirm(self)
            miro.shortcut("r",shift=True)
            miro.click_podcast(reg, feed)
        finally:
            miro.delete_feed(reg, feed)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:39,代码来源:sg41_one_click.py


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