I am trying to build a program to login to my email account based on Selenium. However I am running into the problem that a iframe Pop up will show with a button to continue and I am unable to select the button using Selenium.
The Website to login is: https://www.gmx.net/ which will switch you to this site/popup https://www.gmx.net/consent-management/
The Button on the right "Akzeptieren und weiter" ( Accept and continue ) is not selectable through Selenium.
The code I am using is:
driver.get('https://www.gmx.net')
time.sleep(5)
driver.switchTo.frame(1)
time.sleep(5)
email_text_field5 = driver.find_element(By.XPATH, '//*[@id="save-all-pur"]')
email_text_field5.click()
time.sleep(5)
I have also tried using:
email_text_field5 = driver.find_element(By.ID, "save-all-pur")
email_text_field5.click()
however I am continuously running into the NoSuchElementException with both methods of selection Error:
---------------------------------------------------------------------------
NoSuchElementException Traceback (most recent call last)
Cell In [13], line 12
10 #driver.get('https://www.gmx.net/consent-management/')
11 time.sleep(5)
---> 12 email_text_field5 = driver.find_element(By.ID, "save-all-pur")
13 email_text_field5.click()
16 time.sleep(5)
The only other method to properly select the iframe is through ID however I can't seem to find any ID for this specific Iframe
Any help would be greatly appreciated