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


Python MiroApp.count_images方法代码示例

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


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

示例1: test_123

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

示例2: test_138

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

示例3: test_722

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import count_images [as 别名]
    def test_722(self):
        """http://litmus.pculture.org/show_test.cgi?id=722 delete feeds and folders confirm dialog.

        Litmus Test Title:: 722 - delete feeds confirm dialog
        Description: 
        1. Import OPML file of some feeds and folders
        2. 1 feed and 1 folder
        3. Delete, verify confirm dialog, and delete
        4. Cleanup
        """
        setAutoWaitTimeout(myLib.testvars.timeout)
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()
        miro.delete_all_podcasts(reg)
        opml_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","folder-test.opml")
        feed = "Featured"
        folder = "GEEKY"
        feedlist = ["Google", "Make", "GEEKY", "Featured"]

        #1. Add the feeds 
        miro.import_opml(reg, opml_path)
   
        p = miro.get_podcasts_region(reg)
        miro.click_podcast(reg, feed)            
        #2. Select the folder too
        keyDown(Key.SHIFT)
        p.click(folder)
        keyUp(Key.SHIFT)
        #3. Delete
        type(Key.DELETE)
        for x in feedlist:
            miro.count_images(reg, img=x,region="main",num_expected=1)             
        type(Key.ENTER)
        time.sleep(2)
        #4. Cleanup
        miro.delete_all_podcasts(reg)
        p = miro.get_podcasts_region(reg)
        for x in feedlist:
            if not p.exists(x):
                miro.log_result("202","test_722")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:43,代码来源:sg40_feed_folders.py


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