in pages/desktop/base.py [0:0]
def click_user_menu_links(self, count, landing_page):
user = WebDriverWait(
self.driver, 30, ignored_exceptions=StaleElementReferenceException
).until(
EC.element_to_be_clickable(
(
By.CSS_SELECTOR,
".Header-authenticate-button",
)
)
)
action = ActionChains(self.driver)
action.move_to_element(user)
action.pause(2)
action.perform()
link = WebDriverWait(
self.driver, 20, ignored_exceptions=StaleElementReferenceException
).until(EC.element_to_be_clickable(self.user_menu_link(count)))
action.move_to_element(link)
action.pause(2)
action.click()
action.perform()
# waits for the landing page to open
self.wait.until(
EC.visibility_of_element_located((By.CSS_SELECTOR, landing_page)),
message=f"Expected page not loaded; page was {self.driver.current_url}",
)