I am trying to access the sign in button on the url as shown in the code below. I have verified the content of the url as well as the href. They are both consistent with what ap
To click on Sign In link Induce WebDriverWait
() and element_to_be_clickable
() and following css selector.
WebDriverWait(browser,10).until(EC.element_to_be_clickable((By.CSS_SELECTOR,"a.main-navigation__navbar>.main-navigation__navbar-text"))).click()
Or following xpath.
WebDriverWait(browser,5).until(EC.element_to_be_clickable((By.XPATH,"//span[text()='Sign In']"))).click()
You need to import below libraries.
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC