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


Python Home.click_first_home_page_app方法代码示例

本文整理汇总了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)
开发者ID:prasannamoharana,项目名称:marketplace-tests,代码行数:21,代码来源:test_details_page.py

示例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)
开发者ID:prasannamoharana,项目名称:marketplace-tests,代码行数:26,代码来源:test_details_page.py


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