def execises_logout(self):
"""Exercises logout helper."""
wait = WebDriverWait(self.driver, 3)
try:
wait.until(
expect.element_to_be_clickable(
(By.ID, 'navbar-dropdown')
)
).click()
wait.until(
expect.element_to_be_clickable(
(By.CSS_SELECTOR, '[type="submit"]')
)
).click()
self.page.wait_for_page_load()
except NoSuchElementException:
# Different page, but uses the same logic and link text
self.find(By.CSS_SELECTOR, '[data-method]').click()
评论列表
文章目录