本文整理汇总了Python中pages.home.Home.click_to_explore方法的典型用法代码示例。如果您正苦于以下问题:Python Home.click_to_explore方法的具体用法?Python Home.click_to_explore怎么用?Python Home.click_to_explore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.click_to_explore方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_five_star_rating_increments
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_to_explore [as 别名]
def test_that_five_star_rating_increments(self, mozwebqa):
""" Litmus 22920
https://litmus.mozilla.org/show_test.cgi?id=22920 """
# Step 1 - Login into AMO
home_page = Home(mozwebqa)
home_page.login()
Assert.true(home_page.header.is_user_logged_in)
# Step 2 - Go to add-ons listing page sorted by rating
extensions_home_page = home_page.click_to_explore('Top Rated')
# Step 3 - Pick an addon with no reviews
extensions_home_page.go_to_last_page()
addon = extensions_home_page.extensions[-1] # the last one is without rating
addon_name = addon.name
details_page = Details(mozwebqa, addon_name)
# Step 4 - Click on the "Write review" button
write_review_block = details_page.click_to_write_review()
# Step 5 - Add review with 1-star rating
body = 'Automatic addon review by Selenium tests'
write_review_block.enter_review_with_text(body)
write_review_block.set_review_rating(5)
write_review_block.click_to_save_review()
# Step 6 - Ensure rating increased by one
details_page = Details(mozwebqa, addon_name)
new_rating_counter = details_page.get_rating_counter(5)
Assert.equal(new_rating_counter, 1)