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


Python addons_site.AddonsHomePage类代码示例

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


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

示例1: test_breadcrumb_menu_in_persona_details_page

    def test_breadcrumb_menu_in_persona_details_page(self, testsetup):
        """ Test for Litmus 12046
            https://litmus.mozilla.org/show_test.cgi?id=12046"""

        # Step 1, 2: Access AMO Homepage, Click on Persona category link.
        amo_home_page = AddonsHomePage(testsetup)
        amo_personas_page = amo_home_page.click_personas()
        Assert.true(amo_personas_page.is_the_current_page)

        # Step 3: Click on any persona.
        random_persona_index = random.randint(1, amo_personas_page.persona_count)
        print "random_persona_index: %s" % str(random_persona_index)
        amo_personas_detail_page = amo_personas_page.click_persona(random_persona_index)
        print "url_current_page:     %s" % str(amo_personas_detail_page.get_url_current_page())
        Assert.true(amo_personas_detail_page.is_the_current_page)

        # Verify breadcrumb menu format, i.e. Add-ons for Firefox > Personas > {Persona Name}.
        persona_title = amo_personas_detail_page.personas_title
        Assert.equal("Add-ons for Firefox", amo_personas_detail_page.get_breadcrumb_item_text(1))
        Assert.equal("Personas", amo_personas_detail_page.get_breadcrumb_item_text(2))
        Assert.equal(persona_title, amo_personas_detail_page.get_breadcrumb_item_text(3))

        # Step 4: Click on the links present in the Breadcrumb menu.
        # Verify that the Personas link loads the Personas home page.
        amo_personas_detail_page.click_breadcrumb_item("Personas")
        Assert.true(amo_personas_page.is_the_current_page)

        amo_personas_page.return_to_previous_page()
        Assert.true(amo_personas_detail_page.is_the_current_page)

        # Verify that the Add-ons for Firefox link loads the AMO home page.
        amo_personas_detail_page.click_breadcrumb_item("Add-ons for Firefox")
        Assert.true(amo_home_page.is_the_current_page)
开发者ID:vladmaniac,项目名称:Addon-Tests,代码行数:33,代码来源:test_personas.py

示例2: test_that_clicking_on_theme_name_loads_its_detail_page

 def test_that_clicking_on_theme_name_loads_its_detail_page(self, mozwebqa):
     """test for litmus 15363"""
     amo_home_page = AddonsHomePage(mozwebqa)
     amo_themes_page = amo_home_page.click_themes()
     addon_name = amo_themes_page.addon_names[0]
     amo_theme_page = amo_themes_page.click_on_first_addon()
     Assert.contains(addon_name, amo_theme_page.addon_title)
开发者ID:rakeshmick,项目名称:Addon-Tests,代码行数:7,代码来源:test_themes.py

示例3: test_themes_subcategory_page_breadcrumb

 def test_themes_subcategory_page_breadcrumb(self, testsetup):
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     selected_category = amo_themes_page.themes_category
     amo_category_page = amo_themes_page.click_on_first_category()
     expected_breadcrumb = "Add-ons for Firefox Themes %s" % selected_category
     Assert.equal(expected_breadcrumb, amo_category_page.breadcrumb)
开发者ID:vladmaniac,项目名称:Addon-Tests,代码行数:7,代码来源:test_themes.py

示例4: test_that_new_review_is_saved

    def test_that_new_review_is_saved(self, testsetup):
        """ Litmus 22921
            https://litmus.mozilla.org/show_test.cgi?id=22921 """
        # Step 1 - Login into AMO
        amo_home_page = AddonsHomePage(testsetup)
        credentials = amo_home_page.credentials_of_user('default')
        amo_home_page.header.click_login()
        addons_login_page = AddonsLoginPage(testsetup)
        addons_login_page.login(credentials['email'], credentials['password'])
        Assert.true(amo_home_page.header.is_user_logged_in)

        # Step 2 - Load any addon detail page
        details_page = AddonsDetailsPage(testsetup, 'Adblock Plus')

        # Step 3 - Click on "Write review" button
        write_review_block = details_page.click_to_write_review()

        # Step 4 - Write a review
        body = 'Automatic addon review by Selenium tests'
        write_review_block.enter_review_with_text(body)
        write_review_block.set_review_rating(1)
        review_page = write_review_block.click_to_save_review()

        # Step 5 - Assert review
        review = review_page.review()
        Assert.equal(review.rating, 1)
        Assert.equal(review.author, credentials['name'])
        date = datetime.now().strftime("%B %d, %Y")
        # there are no leading zero-signs on day so we need to remove them too
        date = date.replace(' 0', ' ')
        Assert.equal(review.date, date)
        Assert.equal(review.text, body)
开发者ID:Dualtha,项目名称:Addon-Tests,代码行数:32,代码来源:test_reviews.py

示例5: test_that_clicking_on_a_subcategory_loads_expected_page

 def test_that_clicking_on_a_subcategory_loads_expected_page(self, testsetup):
     """test for litmus 15949"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     selected_category = amo_themes_page.themes_category
     amo_category_page = amo_themes_page.click_on_first_category()
     Assert.equal(selected_category, amo_category_page.title)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:7,代码来源:test_themes.py

示例6: test_the_featured_personas_section

 def test_the_featured_personas_section(self, testsetup):
     """ Test for Litmus 15392
         https://litmus.mozilla.org/show_test.cgi?id=15392"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_personas_page = amo_home_page.click_personas()
     Assert.true(amo_personas_page.is_the_current_page)
     Assert.equal(6, amo_personas_page.featured_personas_count)
开发者ID:vladmaniac,项目名称:Addon-Tests,代码行数:7,代码来源:test_personas.py

示例7: test_that_clicking_on_theme_name_loads_its_detail_page

 def test_that_clicking_on_theme_name_loads_its_detail_page(self, testsetup):
     """test for litmus 15363"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     addon_name = amo_themes_page.addon_names[0]
     amo_theme_page = amo_themes_page.click_on_first_addon()
     Assert.equal(addon_name, amo_theme_page.addon_title)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:7,代码来源:test_themes.py

示例8: test_that_themes_is_listed_as_a_category

 def test_that_themes_is_listed_as_a_category(self):
     """ Test for litmus 4839 
         https://litmus.mozilla.org/show_test.cgi?id=4839
     """
     amo_home_page = AddonsHomePage(self.selenium)
     self.assertTrue(amo_home_page.has_category("themes"))
     amo_home_page.click_category("themes")
     self.assertTrue(amo_home_page.current_page_is("themes"))
开发者ID:theflyingbrush,项目名称:Addon-Tests,代码行数:8,代码来源:test_themes.py

示例9: test_that_entering_a_long_string_returns_no_results

 def test_that_entering_a_long_string_returns_no_results(self):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(self.selenium)
     amo_search_page = amo_home_page.search_for("a" * 255)
     self.assertTrue(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     self.assertTrue("0 - 0 of 0" in results_count)
开发者ID:rivlinp,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py

示例10: test_that_entering_a_long_string_returns_no_results

 def test_that_entering_a_long_string_returns_no_results(self, testsetup):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("a" * 255)
     Assert.true(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.true("0 - 0 of 0" in results_summary)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py

示例11: test_that_character_escaping_doesnt_go_into_the_test

 def test_that_character_escaping_doesnt_go_into_the_test(self, testsetup):
     """ Test for Litmus 4857
         https://litmus.mozilla.org/show_test.cgi?id=4857"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("personas%20plus")
     Assert.true(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.true("0 - 0 of 0" in results_summary)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py

示例12: test_that_searching_for_twitter_returns_yoono

 def test_that_searching_for_twitter_returns_yoono(self, testsetup):
     """
     Litmus 17354
     https://litmus.mozilla.org/show_test.cgi?id=17354
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("twitter")
     Assert.equal(amo_search_page.result(0).name, 'Yoono: Twitter Facebook LinkedIn YouTube GTalk AIM')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py

示例13: test_that_verify_the_breadcrumb_on_search_results_page

 def test_that_verify_the_breadcrumb_on_search_results_page(self, testsetup):
     """
     Litmus 17341
     https://litmus.mozilla.org/show_test.cgi?id=17341
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("text")
     Assert.equal(amo_search_page.breadcrumbs_value, 'Add-ons for Firefox Search')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py

示例14: test_that_searching_for_cool_returns_cooliris

 def test_that_searching_for_cool_returns_cooliris(self, testsetup):
     """
     Litmus 17353
     https://litmus.mozilla.org/show_test.cgi?id=17353
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("Cool")
     Assert.equal(amo_search_page.result(0).name, 'Cooliris')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py

示例15: test_that_searching_with_numerals_returns_results

 def test_that_searching_with_numerals_returns_results(self, testsetup):
     """
     Litmus 17347
     https://litmus.mozilla.org/show_test.cgi?id=17347
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("1")
     Assert.true(amo_search_page.result_count > 0)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:8,代码来源:test_search.py


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