本文整理汇总了Python中pages.home.Home.link_destination方法的典型用法代码示例。如果您正苦于以下问题:Python Home.link_destination方法的具体用法?Python Home.link_destination怎么用?Python Home.link_destination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.link_destination方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_sign_up_link_destination_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import link_destination [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))
示例2: test_logo_link_destination_is_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import link_destination [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')))
示例3: test_nav_links_destinations_are_correct
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import link_destination [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))