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


Python Home.login方法代码示例

本文整理汇总了Python中pages.mobile.home.Home.login方法的典型用法代码示例。如果您正苦于以下问题:Python Home.login方法的具体用法?Python Home.login怎么用?Python Home.login使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pages.mobile.home.Home的用法示例。


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

示例1: test_that_checks_the_addition_of_a_review

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_that_checks_the_addition_of_a_review(self, mozwebqa):
        mock_review = MockReview()

        home_page = Home(mozwebqa)
        home_page.go_to_homepage()

        # Create new user and login.
        new_user = home_page.create_new_user()
        home_page.login(user=new_user)

        # Search for an app and go to it's details page.
        search_page = home_page.search_for(self.app_name)
        details_page = search_page.results[0].click_app()
        Assert.true(details_page.is_product_details_visible)

        # Write a review.
        details_page.click_write_review()
        add_review_page = AddReview(mozwebqa)
        review_page = add_review_page.write_a_review(mock_review['rating'], mock_review['body'])

        review_page.wait_for_ajax_on_page_finish()
        review_page.wait_for_reviews_visible()

        # Check review
        Assert.true(review_page.is_successful_message, "Review not added: %s" % review_page.notification_message)
        Assert.equal(review_page.notification_message, "Your review was successfully added!")
        review = review_page.reviews[0]
        Assert.equal(review.rating, mock_review['rating'])
        Assert.contains(review.author, new_user['email'])
        Assert.equal(review.text, mock_review['body'])
开发者ID:brkeerthi,项目名称:marketplace-tests,代码行数:32,代码来源:test_reviews.py

示例2: test_that_checks_the_addition_of_a_review

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_that_checks_the_addition_of_a_review(self, mozwebqa, new_user):
        mock_review = MockReview()
        home_page = Home(mozwebqa)
        home_page.go_to_homepage()
        home_page.nav_menu.click_sign_in()
        home_page.login(new_user['email'], new_user['password'])

        details_page = home_page.go_to_first_free_app_page()
        Assert.true(details_page.is_product_details_visible)

        # Write a review
        review_box = details_page.click_write_review()
        review_box.write_a_review(mock_review['rating'], mock_review['body'])

        Assert.equal(details_page.notification_message, "Your review was successfully posted. Thanks!")
        details_page.wait_notification_box_not_visible()

        # Go to the reviews page
        reviews_page = details_page.click_view_reviews()

        # Check review
        review = reviews_page.reviews[0]
        Assert.equal(review.rating, mock_review['rating'])
        Assert.contains(review.author, new_user['email'])
        Assert.contains(review.text, mock_review['body'])
开发者ID:krupa,项目名称:marketplace-tests,代码行数:27,代码来源:test_reviews.py

示例3: test_user_can_login_and_logout

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
 def test_user_can_login_and_logout(self, base_url, selenium, new_user):
     home_page = Home(base_url, selenium)
     home_page.go_to_homepage()
     home_page.more_menu.click_sign_in()
     home_page.login(new_user['email'], new_user['password'])
     settings_page = home_page.more_menu.click_settings()
     assert new_user['email'] == settings_page.email_text
     home_page = settings_page.more_menu.click_sign_out()
     assert home_page.is_sign_in_visible
开发者ID:diox,项目名称:marketplace-tests,代码行数:11,代码来源:test_users_account.py

示例4: test_user_can_login_and_logout

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_user_can_login_and_logout(self, mozwebqa, new_user):
        home_page = Home(mozwebqa)
        home_page.go_to_homepage()
        home_page.nav_menu.click_sign_in()
        home_page.login(new_user['email'], new_user['password'])
        settings_page = home_page.nav_menu.click_settings()
        assert new_user['email'] == settings_page.email_text

        settings_page.click_sign_out()
        assert settings_page.is_sign_in_visible
开发者ID:GroteGnoom,项目名称:marketplace-tests,代码行数:12,代码来源:test_users_account.py

示例5: test_user_can_go_back_from_settings_page

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_user_can_go_back_from_settings_page(self, base_url, selenium, new_user):
        """
        https://bugzilla.mozilla.org/show_bug.cgi?id=795185#c11
        """
        home_page = Home(base_url, selenium)
        home_page.go_to_homepage()
        home_page.more_menu.click_sign_in()
        home_page.login(new_user['email'], new_user['password'])
        settings_page = home_page.more_menu.click_settings()
        assert new_user['email'] == settings_page.email_text

        home_page = settings_page.header.click_marketplace_icon()
        assert home_page.is_the_current_page
开发者ID:diox,项目名称:marketplace-tests,代码行数:15,代码来源:test_users_account.py

示例6: test_user_can_login_and_logout

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_user_can_login_and_logout(self, mozwebqa):

        home_page = Home(mozwebqa)
        home_page.go_to_homepage()

        acct = self.create_new_user(mozwebqa)
        home_page.nav_menu.click_sign_in()
        home_page.login(acct)

        settings_page = home_page.nav_menu.click_settings()
        Assert.equal(settings_page.email_text, acct.email)

        settings_page.click_sign_out()
        Assert.true(settings_page.is_sign_in_visible)
开发者ID:decode-dev,项目名称:marketplace-tests,代码行数:16,代码来源:test_users_account.py

示例7: test_user_can_go_back_from_settings_page

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_user_can_go_back_from_settings_page(self, mozwebqa, new_user):
        """
        https://bugzilla.mozilla.org/show_bug.cgi?id=795185#c11
        """
        home_page = Home(mozwebqa)
        home_page.go_to_homepage()
        home_page.nav_menu.click_sign_in()
        home_page.login(new_user['email'], new_user['password'])

        settings_page = home_page.nav_menu.click_settings()
        Assert.equal(settings_page.email_text, new_user['email'])

        home_page = settings_page.header.click_marketplace_icon()

        Assert.true(home_page.is_the_current_page)
开发者ID:krupa,项目名称:marketplace-tests,代码行数:17,代码来源:test_users_account.py

示例8: test_that_checks_the_addition_of_a_review

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_that_checks_the_addition_of_a_review(self, mozwebqa, new_user):
        mock_review = MockReview()
        home_page = Home(mozwebqa)
        home_page.go_to_homepage()
        home_page.more_menu.click_sign_in()
        home_page.login(new_user["email"], new_user["password"])
        details_page = home_page.go_to_first_free_app_page()
        assert details_page.is_product_details_visible

        # Write a review
        review_box = details_page.click_write_review()
        review_box.write_a_review(mock_review["rating"], mock_review["body"])
        assert "Your review was successfully posted. Thanks!" == details_page.notification_message
        details_page.wait_notification_box_not_visible()

        # Go to the reviews page
        reviews_page = details_page.click_view_reviews()

        # Check review
        review = reviews_page.reviews[0]
        assert mock_review["rating"] == review.rating
        assert review.author in new_user["email"]
        assert mock_review["body"] in review.text
开发者ID:ithompson4,项目名称:marketplace-tests,代码行数:25,代码来源:test_reviews.py

示例9: test_that_checks_the_addition_of_a_review

# 需要导入模块: from pages.mobile.home import Home [as 别名]
# 或者: from pages.mobile.home.Home import login [as 别名]
    def test_that_checks_the_addition_of_a_review(self, base_url, selenium, new_user):
        mock_review = MockReview()
        home_page = Home(base_url, selenium)
        home_page.go_to_homepage()
        home_page.more_menu.click_sign_in()
        home_page.login(new_user['email'], new_user['password'])
        details_page = home_page.go_to_first_free_app_page()
        assert details_page.is_product_details_visible

        # Write a review
        review_box = details_page.click_write_review()
        review_box.write_a_review(mock_review['rating'], mock_review['body'])
        assert 'Your review was successfully posted. Thanks!' == details_page.notification_message
        details_page.wait_notification_box_not_visible()

        # Go to the reviews page
        reviews_page = details_page.click_view_reviews()

        # Check review
        review = reviews_page.reviews[0]
        assert mock_review['rating'] == review.rating
        assert review.author in new_user['email']
        assert mock_review['body'] in review.text
开发者ID:diox,项目名称:marketplace-tests,代码行数:25,代码来源:test_reviews.py


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