本文整理汇总了Python中element.Element.is_displayed方法的典型用法代码示例。如果您正苦于以下问题:Python Element.is_displayed方法的具体用法?Python Element.is_displayed怎么用?Python Element.is_displayed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类element.Element
的用法示例。
在下文中一共展示了Element.is_displayed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Home
# 需要导入模块: from element import Element [as 别名]
# 或者: from element.Element import is_displayed [as 别名]
class Home(Page):
def __init__(self, driver):
Page.__init__(self, driver)
self.altom_logo = Element(self.driver, (By.XPATH, ".//*[@id='site-title']/a/img"))
self.sidebar = Element(self.driver, (By.CLASS_NAME, "sidebar"))
self.main_content = Element(self.driver, (By.ID, "mainContent"))
self.main_menu = Element(self.driver, (By.ID, "mainMenu"))
self.video = Element(self.driver, (By.ID, "presentation"))
self.phone_number = Element(self.driver, (By.CLASS_NAME, "mainPhone"))
self.blocks = Element(self.driver, (By.CLASS_NAME, "blocks"))
def is_displayed(self):
self.altom_logo.is_displayed()
self.sidebar.is_displayed()
self.main_content.is_displayed()
self.main_menu.is_displayed()
self.video.is_displayed()
self.phone_number.is_displayed()
self.blocks.is_displayed()
return True