本文整理汇总了Python中pages.mobile.home.Home.click_first_home_page_app方法的典型用法代码示例。如果您正苦于以下问题:Python Home.click_first_home_page_app方法的具体用法?Python Home.click_first_home_page_app怎么用?Python Home.click_first_home_page_app使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.mobile.home.Home
的用法示例。
在下文中一共展示了Home.click_first_home_page_app方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_details_page_for_an_app
# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import click_first_home_page_app [as 别名]
def test_details_page_for_an_app(self, mozwebqa):
"""https://moztrap.mozilla.org/runtests/run/243/env/112/ - Verify details page for an app"""
home_page = Home(mozwebqa)
home_page.go_to_homepage()
app_name = home_page.home_page_apps[0].name
# click first app and load its Details Page
details_page = home_page.click_first_home_page_app()
details_page.click_more_button()
# The verifications required by the testcase
Assert.true(details_page.header.is_back_button_visible)
Assert.true(app_name in details_page.title)
Assert.true(details_page.is_author_visible)
Assert.true(details_page.is_app_icon_present)
Assert.true(details_page.is_rating_visible)
Assert.true(details_page.is_product_details_visible)
Assert.true(details_page.is_description_visible)
示例2: test_reviews_section
# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import click_first_home_page_app [as 别名]
def test_reviews_section(self, mozwebqa):
"""https://moztrap.mozilla.org/runtests/run/243/env/112/ - Verify details page for an app - Reviews section"""
home_page = Home(mozwebqa)
home_page.go_to_homepage()
# click first app and load its Details Page
details_page = home_page.click_first_home_page_app()
# This takes the number of reviews on the details page and based on that number it treats 3 different scenarios:
# when the app has reviews, when it has 1 review and when the app isn't rated.
if details_page.is_app_rated:
if details_page.reviews_count >= 2:
if len(details_page.reviews) == 2:
for review in details_page.reviews:
Assert.true(review.is_visible)
elif details_page.reviews_count == 1:
Assert.true(details_page.reviews[0].is_visible)
else:
Assert.equal(details_page.app_not_rated_text, 'App not yet rated')
Assert.true(details_page.is_write_a_review_button_visible)
for support_button in details_page.support_buttons:
Assert.true(support_button.is_visible)