本文整理汇总了Python中pages.home.Home.open方法的典型用法代码示例。如果您正苦于以下问题:Python Home.open方法的具体用法?Python Home.open怎么用?Python Home.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.open方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_logo_link_destination_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_logo_link_destination_is_correct(self):
home = Home(self.driver)
home.open()
home._validate_page(self.driver)
link = Home.Header._logo_url
url = home.link_destination(link.get('locator'))
self.assertTrue(url.endswith(link.get('suffix')), '%s does not ends with %s' %(url, link.get('suffix')))
示例2: test_sign_up_link_destination_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_sign_up_link_destination_is_correct(self):
home = Home(self.driver)
home.open()
home._validate_page(self.driver)
link = Home.Header.sign_up
url = home.link_destination(link.get('locator'))
self.assertTrue(url.endswith(link.get('suffix')), '%s is bad'%(url))
示例3: test_nav_links_destinations_are_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_nav_links_destinations_are_correct(self):
home = Home(self.driver)
home.open()
home._validate_page(self.driver)
bad_links = []
for link in Home.Header.nav_links_list:
url = home.link_destination(link.get('locator'))
if not url.endswith(link.get('suffix')):
bad_links.append((url))
self.assertEqual(0, len(bad_links), 'there are %s bad links: '%(len(bad_links))+', '.join(bad_links))
示例4: test_nav_links_text_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_nav_links_text_is_correct(self):
home = Home(self.driver)
home.open()
home._validate_page(self.driver)
bad_links = []
home.click_filtr_btn(Home.Header.filtr_button['locator'])
for link in Home.Header.nav_links_list:
text = home.link_text(link.get('locator'))
if text != link.get('text'):
bad_links.append('%s links %s'%(text, link.get('suffix')))
self.assertEqual(0, len(bad_links), 'there are %s invalid links: '%(len(bad_links))+', '.join(bad_links))
示例5: test_link_comment_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_link_comment_is_correct(self):
home = Home(self.driver)
home.open()
self.assertEqual(home.link_comments.get('text'), home.link_comment(), 'expected comment to be: %s found %s instead'%(home.link_comments.get('text'), home.link_comment()))
示例6: test_link_img_is_present
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_link_img_is_present(self):
home = Home(self.driver)
home.open()
self.assertTrue(home.is_link_img_visible(), 'exptected link img to be visible but didnt found the img')
示例7: test_link_title_part_two_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_link_title_part_two_is_correct(self):
home = Home(self.driver)
home.open()
self.assertEqual(home.link_title_part_two.get('text'), home.link_title_two(), 'expected link title part one to be: %s, found %s instead'%(home.link_title_part_two.get('text'), home.link_title_two()))
示例8: test_ordinal_number_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import open [as 别名]
def test_ordinal_number_is_correct(self):
home = Home(self.driver)
home.open()
self.assertEqual(home.lp.get('text'), home.link_lp(), 'expected ordinal number to be: %s, found %s instead'%(home.lp.get('text'), home.link_lp()))