I'm trying to login to dropbox using python selenium (https://www.dropbox.com/login) Obviously cookie acceptance is required.
I tried to click on the cookie accept button, but find_element doesn't see it.
I also tried to first switch to the cookie banner, but that doesn't work either.
xpath of the cookie banner: //*[@id="ccpa_consent_banner"]
xpath of cookie button: //*[@id="accept_all_cookies_button"]
Any suggestions?
Root cause of the issue: Desired element is located within IFRAME, you need to switch into it before performing
click()on Accept all button.Assuming you are using PYTHON as your binding language, refer the below code.
Solution: Working code with in-line explanation: