Search code examples
javaseleniumautomated-testsrecaptcha

How to bypass Google reCAPTCHA for testing using Selenium


I am using Selenium to test my Spring based web application. Can you suggest a solution to bypass google reCAPTCHA while testing the application.

I am running automation test in this environment. So manually checking the "I'm not a robot" of reCAPTCHA is not possible.

For testing purpose I am using test key on my testing environment given on below location.

Google reCAPTCHA Testing Key

enter image description here

I am using Angular 5 as front-end of my application. I am using ng-recaptcha library for adding reCAPTCHA in ui.


Solution

  • I don't know your exact code but you should be able to run your server with a System Property or some flag which indicate that the reCaptcha should be disable and to not add it to the form in the first place.