1

How do I click the buster icon in the captcha using python and selenium? Please see image below. I've seen similar post about this but the solutions are outdated and doesn't seem to work anymore. One of the problem being the button is inside the shadow-root (closed). Is there any way to access it? I've tried changing the source code to make the shadow-root open but i can't still access it. The error says "Cannot read properties of null (reading 'shadowRoot')". I've already accomplished this task using pygui but I want to implement the solution using only selenium. Any idea how to do it?

This is my code that works in clicking the captcha checkbox.

WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR,"iframe[name^='a-'][src^='https://www.google.com/recaptcha/api2/anchor?']")))
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//span[@id='recaptcha-anchor']"))).click()

Similar threads that doesn't work: How to bypass ReCaptcha with buster extension using Selenium and Python

Recaptcha image here

drakex
  • 11
  • 1

0 Answers0