本文整理汇总了Python中addons_site.AddonsDetailsPage.page_back方法的典型用法代码示例。如果您正苦于以下问题:Python AddonsDetailsPage.page_back方法的具体用法?Python AddonsDetailsPage.page_back怎么用?Python AddonsDetailsPage.page_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addons_site.AddonsDetailsPage
的用法示例。
在下文中一共展示了AddonsDetailsPage.page_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_all_reviews_hyperlink_works
# 需要导入模块: from addons_site import AddonsDetailsPage [as 别名]
# 或者: from addons_site.AddonsDetailsPage import page_back [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)