-1

I am trying to create a simple test script for verifying the validation message of the signup page but because of the captcha, my script is running into errors. How to bypass it? I am using Cypress version 10, the latest one.

I m trying to bypass captcha by stubs but it does not work

Vivek Lele
  • 109
  • 4
  • Captcha is designed top stop bots or scripts overloading websites demanding information. It might be doing exactly what it is designed for... – Solar Mike Jun 01 '23 at 04:24

3 Answers3

0

You can't automate captcha , that's the whole point of it (so other automated bots can't pass through).

The other solution would be to disable this captcha feature in test environment.

See this article for further assistance (this article is for selenium but principle is the same for cypress also) https://www.browserstack.com/guide/how-to-handle-captcha-in-selenium

0

If you are in staging or testing environment you need to request to your developers or project admin to set the captcha in testing mode:

https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do

then after that you can just click the captcha without security validation

Ry-ry
  • 210
  • 1
  • 4
  • 15
0

we can bi-pas captcha through stub or mock ,In certain cases, you may be able to mock or stub the CAPTCHA functionality during testing. This approach involves simulating the CAPTCHA response or disabling it temporarily for testing purposes. However, this method should be used with caution and only in situations where you have explicit permission or control over the testing environment.