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


Python AddonsAPI.get_list_of_addon_images_links方法代码示例

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


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

示例1: test_that_firebug_images_is_correct

# 需要导入模块: from pages.desktop.addons_api import AddonsAPI [as 别名]
# 或者: from pages.desktop.addons_api.AddonsAPI import get_list_of_addon_images_links [as 别名]
    def test_that_firebug_images_is_correct(self, base_url, selenium):

        # get images links from browser
        firebug_page = Details(base_url, selenium, self.firebug)
        browser_images = [t.source for t in firebug_page.previews.thumbnails]

        # get images links from xml
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_images = addons_xml.get_list_of_addon_images_links()

        # check that both lists have the same number of images
        assert len(browser_images) == len(xml_images)

        # cross check both lists with each other
        for i in range(len(xml_images)):
            assert re.sub('src=api(&|&)', '', xml_images[i]) == browser_images[i]
开发者ID:APRODEV,项目名称:Addon-Tests,代码行数:18,代码来源:test_details_page_against_xml.py

示例2: test_that_firebug_images_is_correct

# 需要导入模块: from pages.desktop.addons_api import AddonsAPI [as 别名]
# 或者: from pages.desktop.addons_api.AddonsAPI import get_list_of_addon_images_links [as 别名]
    def test_that_firebug_images_is_correct(self, base_url, selenium):

        # get images links from browser
        firebug_page = Details(base_url, selenium, self.firebug)
        images_count = firebug_page.previewer.image_count
        browser_images = []
        for i in range(images_count):
            browser_images.append(firebug_page.previewer.image_link(i))

        # get images links from xml
        addons_xml = AddonsAPI(base_url, self.firebug)
        xml_images = addons_xml.get_list_of_addon_images_links()

        # check that both lists have the same number of images
        assert len(browser_images) == len(xml_images)

        # cross check both lists with each other
        for i in range(len(xml_images)):
            assert re.sub('src=api(&|&)', '', xml_images[i]) == browser_images[i]
开发者ID:Ruwan-Ranganath,项目名称:Addon-Tests,代码行数:21,代码来源:test_details_page_against_xml.py

示例3: test_that_firebug_images_is_correct

# 需要导入模块: from pages.desktop.addons_api import AddonsAPI [as 别名]
# 或者: from pages.desktop.addons_api.AddonsAPI import get_list_of_addon_images_links [as 别名]
    def test_that_firebug_images_is_correct(self, mozwebqa):
        """Test for Litmus 15324."""

        #get images links from browser
        firebug_page = Details(mozwebqa, self.firebug)
        images_count = firebug_page.previewer.image_count
        browser_images = []
        for i in range(images_count):
            browser_images.append(firebug_page.previewer.image_link(i))

        #get images links from xml
        addons_xml = AddonsAPI(mozwebqa, self.firebug)
        xml_images = addons_xml.get_list_of_addon_images_links()

        #check that both lists have the same number of images
        Assert.equal(len(browser_images), len(xml_images))

        #cross check both lists with each other
        for i in range(len(xml_images)):
            Assert.equal(
                re.sub('src=api(&|&)', '', xml_images[i]),
                browser_images[i])
开发者ID:chirarobert,项目名称:Addon-Tests,代码行数:24,代码来源:test_details_page_against_xml.py


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