79759734

Date: 2025-09-09 09:57:58
Score: 1
Natty:
Report link

On demo sites it may work because the shadow root is open, allowing Selenium to access and click the checkbox.

On your target site, however, the shadow root is closed and there is an iframe inside it — Selenium cannot directly interact with elements inside a closed shadow root.

In practice, you have two options:

  1. Use Puppeteer / Chrome DevTools Protocol (CDP), which can access closed shadow roots and perform clicks.

  2. Use the API to inject the token from 2Captcha and submit the form without clicking the checkbox — if the site accepts it.

Selenium alone won’t be able to click the checkbox in this scenario.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: PyDev