本文整理汇总了Python中pages.home.Home.categories方法的典型用法代码示例。如果您正苦于以下问题:Python Home.categories方法的具体用法?Python Home.categories怎么用?Python Home.categories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.categories方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_category_names_are_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import categories [as 别名]
def test_that_category_names_are_correct(self, mozwebqa):
"""Test for Litmus 25795"""
expected_categories = [
"Alerts & Updates",
"Appearance",
"Bookmarks",
"Download Management",
"Feeds, News & Blogging",
"Games & Entertainment",
"Language Support",
"Photos, Music & Videos",
"Privacy & Security",
"Shopping",
"Social & Communication",
"Tabs",
"Web Development",
"Other"]
# Get actual categories
home_page = Home(mozwebqa)
categories = home_page.categories()
# Catch extra/missing categories with a simple count check
Assert.equal(len(categories), len(expected_categories))
# Check the categories that are there against the expected list
for category in categories:
Assert.contains(category.name, expected_categories)
示例2: test_that_all_category_links_work
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import categories [as 别名]
def test_that_all_category_links_work(self, mozwebqa):
"Test for Litmus 25796"
home_page = Home(mozwebqa)
categories = home_page.categories()
for category in categories:
category_name = category.name
category_page = category.click_link()
Assert.contains(category_name, category_page.category_page_title)
Assert.equal(category_name, category_page.category_header_title)
home_page = Home(mozwebqa)