I am trying to click on a 2FA 'Send me a push' button, however none of my previous attempts have succeeded
def launch_login():
#open login web page
chrome_options = Options()
chrome_options.add_experimental_option("detach", True)
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
driver.get("http://my.csus.edu")
#enter login
driver.find_element(By.XPATH, "//input[@id='username']").send_keys("xxxxxxxx")
driver.find_element(By.XPATH, "//input[@id='password']").send_keys("xxxxxxxx")
login = driver.find_element(By.XPATH, "//button[contains(text(),'Login')]")
login.click()
#click duo push button
driver.find_element(By.XPATH, "//button[starts-with(@class, 'positive auth-button') and contains(., 'Send Me a Push')]").click()
return driver
driver = launch_csus()
This is error I am receiving
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//button[starts-with(@class, 'positive auth-button') and contains(., 'Send Me a Push')]"}
(Session info: chrome=101.0.4951.41)
I am still pretty new to selenium and am learning as I go. Is the button a special type of button that behaves in a certain way? Is there a specific way to access the button?
Send me a push inspect: