pythonseleniumiframerecaptchawebdriverwait

How to bypass ReCaptcha with buster extension using Selenium and Python


Currently, I automate some processes using selenium and need to solve Google ReCaptcha. The technology used to solve the ReCaptcha is the browser, Plugin Buster. I enter the Google ReCaptcha using the following

driver.switch_to.frame(driver.find_elements_by_tag_name("iframe")[0])
check_box = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "recaptcha-anchor")))
check_box.click()

Now I switch back to the default Frame using:

driver.switch_to.default_content()

So I need to click the Buster icon, but how to do that?

Icon to click:

Icon to click


Solution

  • The Buster icon is within another sibling <iframe>. So you have to:

    recaptcha_iframe


    Reference

    You can find a couple of relevant discussions in:


    Outro

    Ways to deal with #document under iframe