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


Python AddonsDetailsPage.go_to_last_page方法代码示例

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


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

示例1: test_that_all_reviews_hyperlink_works

# 需要导入模块: from addons_site import AddonsDetailsPage [as 别名]
# 或者: from addons_site.AddonsDetailsPage import go_to_last_page [as 别名]
    def test_that_all_reviews_hyperlink_works(self, mozwebqa):
        """ Test for litmus 4843
            https://litmus.mozilla.org/show_test.cgi?id=4843
        """
        #Open details page for Adblock Plus
        amo_details_page = AddonsDetailsPage(mozwebqa, 'Adblock Plus')
        Assert.true(amo_details_page.has_reviews)

        amo_details_page.click_all_reviews_link()
        Assert.equal(amo_details_page.review_count, 20)

        #Go to the last page and check that the next button is not present
        amo_details_page.go_to_last_page()
        Assert.false(amo_details_page.is_next_link_present)

        #Go one page back, check that it has 20 reviews
        #that the page number decreases and that the next link is visible
        page_number = amo_details_page.current_page
        amo_details_page.page_back()
        Assert.true(amo_details_page.is_next_link_visible)
        Assert.equal(amo_details_page.review_count, 20)
        Assert.equal(amo_details_page.current_page, page_number - 1)

        #Go to the first page and check that the prev button is not present
        amo_details_page.go_to_first_page()
        Assert.false(amo_details_page.is_prev_link_present)

        #Go one page forward, check that it has 20 reviews,
        #that the page number increases and that the prev link is visible
        page_number = amo_details_page.current_page
        amo_details_page.page_forward()
        Assert.true(amo_details_page.is_prev_link_visible)
        Assert.equal(amo_details_page.review_count, 20)
        Assert.equal(amo_details_page.current_page, page_number + 1)
开发者ID:rakeshmick,项目名称:Addon-Tests,代码行数:36,代码来源:test_reviews.py


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