Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to Handle CAPTCHA in Selenium Automation?


I understand that CAPTCHAs are meant to prevent automation, but for testing purposes, I need to bypass or handle CAPTCHA in my Selenium script. Is there any way to automate this or perhaps use some manual intervention without disrupting the automation flow?



  • benken_parasoft
    benken_parasoft Posts: 1,253 ✭✭✭

    You could add a delay in your Selenium test to give you time to manually interact with the browser to solve the CAPTCHA. In Java, you can call Thread.sleep(millis). Otherwise, you would need to somehow disable the CAPTCHA in your test environment, possibly using a custom or modified deployment of your web application. As an example, it looks like Google's reCAPTCHA has some way of doing this: I'd like to run automated tests with reCAPTCHA. What should I do?