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


Python start_page.StartPage类代码示例

本文整理汇总了Python中pages.start_page.StartPage的典型用法代码示例。如果您正苦于以下问题:Python StartPage类的具体用法?Python StartPage怎么用?Python StartPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: test_about_page_has_proper_titles

    def test_about_page_has_proper_titles(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()

        about_page = home_page.click_about_nav_link()
        Assert.true(about_page.is_the_current_url)
        Assert.equal(about_page.faq_header, 'Frequently Asked Questions')
开发者ID:rbillings,项目名称:Affiliates-Tests,代码行数:7,代码来源:test_about.py

示例2: test_about_page_faq_answers_present

    def test_about_page_faq_answers_present(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()

        about_page = home_page.click_about_nav_link()
        Assert.equal(about_page.questions_count, about_page.answers_count,
                     'Questions count did not match answers count')
开发者ID:rbillings,项目名称:Affiliates-Tests,代码行数:7,代码来源:test_about.py

示例3: test_login_logout_works_properly

 def test_login_logout_works_properly(self, mozwebqa):
     start_page = StartPage(mozwebqa)
     home_page = start_page.login()
     Assert.true(home_page.is_user_logged_in, 'User not logged in')
     Assert.equal(home_page.header, 'Follow these easy steps to get started:')
     home_page.click_logout()
     Assert.false(home_page.is_user_logged_in, 'User logged in')
     Assert.equal(start_page.header, 'Become a Firefox Affiliate Today!')
开发者ID:AlexLakatos,项目名称:Affiliates-Tests,代码行数:8,代码来源:test_start_page.py

示例4: test_about_page

    def test_about_page(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()

        about_page = home_page.click_about_nav_button()
        Assert.equal(home_page.header, "About Affiliates")
        Assert.true(about_page.is_the_current_url)
        Assert.not_none(about_page.about_text)
开发者ID:klrmn,项目名称:Affiliates-Tests,代码行数:8,代码来源:test_home_page.py

示例5: test_login_logout_works_properly

 def test_login_logout_works_properly(self, mozwebqa):
     start_page = StartPage(mozwebqa)
     home_page = start_page.login()
     Assert.true(home_page.is_user_logged_in, 'User not logged in')
     Assert.equal(home_page.header, 'Dashboard')
     home_page.logout()
     Assert.false(home_page.is_user_logged_in, 'User logged in')
     Assert.equal(start_page.header, 'Become a Firefox Affiliate today!')
开发者ID:GruLab,项目名称:Affiliates-Tests,代码行数:8,代码来源:test_start_page.py

示例6: test_login_logout_works_properly

 def test_login_logout_works_properly(self, base_url, selenium, existing_user):
     start_page = StartPage(base_url, selenium)
     home_page = start_page.login(existing_user['email'], existing_user['password'])
     assert home_page.is_user_logged_in
     assert 'Dashboard' == home_page.header
     home_page.logout()
     assert not home_page.is_user_logged_in
     assert 'Important Notice: Firefox Affiliates is being discontinued' == start_page.header
开发者ID:davehunt,项目名称:Affiliates-Tests,代码行数:8,代码来源:test_start_page.py

示例7: test_change_banner_size_correct

    def test_change_banner_size_correct(self, mozwebqa):
        size = "180x150"
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()

        home_page.categories[0].select_category()
        home_page.categories[0].select_category()
        home_page.select_size(size)
        Assert.contains(size, home_page.banner_html_code)
开发者ID:klrmn,项目名称:Affiliates-Tests,代码行数:9,代码来源:test_home_page.py

示例8: test_edit_profile_has_proper_display_name

    def test_edit_profile_has_proper_display_name(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()
        username = mozwebqa.credentials["default"]["name"]

        edit_page = home_page.click_edit_profile()
        Assert.equal(home_page.header, "Edit your user profile")
        Assert.equal(edit_page.get_label_text_for("display_name"), "DISPLAY NAME")
        Assert.equal(edit_page.get_input_text_for("display_name"), username)
开发者ID:klrmn,项目名称:Affiliates-Tests,代码行数:9,代码来源:test_home_page.py

示例9: test_change_banner_size_correct

    def test_change_banner_size_correct(self, mozwebqa):
        size = '300x250'
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()

        home_page.categories[0].select_category()
        home_page.categories[0].select_category()
        home_page.select_size(size)
        Assert.contains(size, home_page.banner_size_text)
开发者ID:chirarobert,项目名称:Affiliates-Tests,代码行数:9,代码来源:test_home_page.py

示例10: test_leaderboard_layout_for_guest_users

    def test_leaderboard_layout_for_guest_users(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        leaderboard_page = start_page.click_leaderboard_link()
        Assert.contains('Top Affiliates', leaderboard_page.title)
        Assert.greater('Leaderboard is empty',
                       0, leaderboard_page.leaderboard_user_count)

        for user_row in leaderboard_page.leaderboard_user_rows:
            Assert.true('Row not visible. Row info: %s' % user_row,
                        user_row.is_row_visible())
开发者ID:GruLab,项目名称:Affiliates-Tests,代码行数:10,代码来源:test_leaderboard_page.py

示例11: test_edit_profile_has_proper_display_name

    def test_edit_profile_has_proper_display_name(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()
        username = mozwebqa.credentials['default']['name']

        edit_page = home_page.click_profile()
        Assert.equal(home_page.header, username)
        edit_page_modal = edit_page.click_edit_profile()
        Assert.equal(edit_page_modal.display_name_label, 'DISPLAY NAME')
        Assert.equal(edit_page_modal.display_name, username)
开发者ID:PopescuAndreea,项目名称:Affiliates-Tests,代码行数:10,代码来源:test_profile.py

示例12: test_about_page_has_proper_layout

 def test_about_page_has_proper_layout(self, base_url, selenium, existing_user):
     start_page = StartPage(base_url, selenium)
     home_page = start_page.login(existing_user['email'], existing_user['password'])
     about_page = home_page.click_about_nav_link()
     assert about_page.is_the_current_url
     assert 'Frequently Asked Questions' == about_page.faq_header
     assert about_page.about_text is not None, 'about page has no text to display'
     assert about_page.category_count > 0, 'FAQ category not present'
     assert about_page.questions_count > 0, 'No faq questions present in about page'
     about_page = home_page.click_about_nav_link()
     assert about_page.questions_count == about_page.answers_count, 'Questions count did not match answers count'
开发者ID:davehunt,项目名称:Affiliates-Tests,代码行数:11,代码来源:test_about_page.py

示例13: test_edit_profile_has_proper_display_name

    def test_edit_profile_has_proper_display_name(self, mozwebqa):
        if mozwebqa.base_url == 'https://affiliates-dev.allizom.org':
            pytest.xfail(reason='Bug 897575 - [dev][traceback] Unable to register new accounts')
        start_page = StartPage(mozwebqa)
        home_page = start_page.login()
        username = mozwebqa.credentials['default']['name']

        edit_page = home_page.click_edit_profile()
        Assert.equal(home_page.header, 'Edit your user profile')
        Assert.equal(edit_page.get_label_text_for('display_name'), 'DISPLAY NAME')
        Assert.equal(edit_page.get_input_text_for('display_name'), username)
开发者ID:bobsilverberg,项目名称:Affiliates-Tests,代码行数:11,代码来源:test_home_page.py

示例14: test_new_account_creation

    def test_new_account_creation(self, mozwebqa):
        start_page = StartPage(mozwebqa)
        home_page = start_page.create_new_account()

        Assert.true(home_page.is_user_logged_in)

        logged_out = home_page.logout()
        Assert.false(logged_out.is_user_logged_in)

        logged_in = logged_out.login()
        Assert.true(logged_in.is_user_logged_in)
开发者ID:GruLab,项目名称:Affiliates-Tests,代码行数:11,代码来源:test_profile.py

示例15: test_about_page_has_proper_layout

 def test_about_page_has_proper_layout(self, mozwebqa, existing_user):
     start_page = StartPage(mozwebqa)
     home_page = start_page.login(existing_user["email"], existing_user["password"])
     about_page = home_page.click_about_nav_link()
     assert about_page.is_the_current_url
     assert "Frequently Asked Questions" == about_page.faq_header
     assert about_page.about_text is not None, "about page has no text to display"
     assert about_page.category_count > 0, "FAQ category not present"
     assert about_page.questions_count > 0, "No faq questions present in about page"
     about_page = home_page.click_about_nav_link()
     assert about_page.questions_count == about_page.answers_count, "Questions count did not match answers count"
开发者ID:m8ttyB,项目名称:Affiliates-Tests,代码行数:11,代码来源:test_about_page.py


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