本文整理汇总了Python中pages.home.Home.click_personas方法的典型用法代码示例。如果您正苦于以下问题:Python Home.click_personas方法的具体用法?Python Home.click_personas怎么用?Python Home.click_personas使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.click_personas方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_the_featured_personas_section
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_the_featured_personas_section(self, mozwebqa):
""" Test for Litmus 15392
https://litmus.mozilla.org/show_test.cgi?id=15392"""
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.true(personas_page.is_the_current_page)
Assert.equal(6, personas_page.featured_personas_count)
示例2: test_searching_for_personas_returns_results
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_searching_for_personas_returns_results(self, mozwebqa):
"""Litmus 17349
https://litmus.mozilla.org/show_test.cgi?id=17349"""
amo_home_page = Home(mozwebqa)
amo_personas_page = amo_home_page.click_personas()
amo_personas_page.header.search_for('fox')
Assert.true(amo_personas_page.persona_count > 0)
示例3: test_the_top_rated_section
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_the_top_rated_section(self, mozwebqa):
""" Test for Litmus 15395
https://litmus.mozilla.org/show_test.cgi?id=15395"""
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.true(personas_page.is_the_current_page)
Assert.equal(6, personas_page.top_rated_count)
ratings = personas_page.top_rated_ratings
Assert.is_sorted_descending(ratings)
示例4: test_the_most_popular_section
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_the_most_popular_section(self, mozwebqa):
""" Test for Litmus 15394
https://litmus.mozilla.org/show_test.cgi?id=15394"""
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.true(personas_page.is_the_current_page)
Assert.equal(6, personas_page.most_popular_count)
downloads = personas_page.most_popular_downloads
Assert.is_sorted_descending(downloads)
示例5: test_personas_breadcrumb_format
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_personas_breadcrumb_format(self, mozwebqa):
"""
Verify the breadcrumb format in personas page
https://litmus.mozilla.org/show_test.cgi?id=12034
"""
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.equal(personas_page.breadcrumb_text(0), 'Add-ons for Firefox')
Assert.equal(personas_page.breadcrumb_text(1), 'Personas')
Assert.equal(personas_page.breadcrumb_text_all, 'Add-ons for Firefox Personas')
示例6: test_start_exploring_link_in_the_promo_box
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_start_exploring_link_in_the_promo_box(self, mozwebqa):
""" Test for Litmus 12037
https://litmus.mozilla.org/show_test.cgi?id=12037"""
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.true(personas_page.is_the_current_page)
Assert.true(personas_page.is_featured_addons_present)
browse_personas_page = personas_page.click_start_exploring()
Assert.true(browse_personas_page.is_the_current_page)
Assert.equal("up-and-coming", browse_personas_page.sort_key)
Assert.equal("Up & Coming", browse_personas_page.sort_by)
示例7: test_breadcrumb_menu_in_persona_details_page
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_breadcrumb_menu_in_persona_details_page(self, mozwebqa):
""" Test for Litmus 12046
https://litmus.mozilla.org/show_test.cgi?id=12046"""
# Step 1, 2: Access AMO Home, Click on Persona category link.
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.true(personas_page.is_the_current_page)
# Step 3: Click on any persona.
random_persona_index = random.randint(1, personas_page.persona_count)
print 'random_persona_index: %s' % str(random_persona_index)
personas_detail_page = personas_page.click_persona(random_persona_index)
print 'url_current_page: %s' % str(personas_detail_page.get_url_current_page())
Assert.true(personas_detail_page.is_the_current_page)
# Verify breadcrumb menu format, i.e. Add-ons for Firefox > Personas > {Persona Name}.
persona_title = personas_detail_page.personas_title
Assert.equal("Add-ons for Firefox", personas_detail_page.get_breadcrumb_item_text(1))
Assert.equal("Personas", personas_detail_page.get_breadcrumb_item_text(2))
persona_breadcrumb_title = len(persona_title) > 40 and '%s...' % persona_title[:40] or persona_title
Assert.equal(personas_detail_page.get_breadcrumb_item_text(3), persona_breadcrumb_title)
# Step 4: Click on the links present in the Breadcrumb menu.
# Verify that the Personas link loads the Personas home page.
personas_detail_page.click_breadcrumb_item("Personas")
Assert.true(personas_page.is_the_current_page)
personas_page.return_to_previous_page()
Assert.true(personas_detail_page.is_the_current_page)
# Verify that the Add-ons for Firefox link loads the AMO home page.
personas_detail_page.click_breadcrumb_item("Add-ons for Firefox")
Assert.true(home_page.is_the_current_page)
示例8: test_page_title_for_personas_landing_page
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_personas [as 别名]
def test_page_title_for_personas_landing_page(self, mozwebqa):
""" Test for Litmus 15391
https://litmus.mozilla.org/show_test.cgi?id=15391"""
home_page = Home(mozwebqa)
personas_page = home_page.click_personas()
Assert.true(personas_page.is_the_current_page)