How to emulate a robot behaviour when using Google Recaptcha V3
Asked Answered
H

3

12

I have implemented google recaptcha v3 in my application and i'm pretty confident that it is working (when testing it I get the response I'm expecting). However I am but a simple human and I would like to test my code by emulating a robot behaviour. It would work with recaptcha v2 by modify the headers with the extension "Modify Headers for Google Chrome" but in this case, I get the same score as with a normal human header.
Is this an expected outcome ?
Is this an unexpected outcome and something is wrong with what I wrote ?
Or is there another, better tool to emulate a robot ?

Hissing answered 14/3, 2019 at 16:32 Comment(0)
D
1

If you are using recaptcha enterprise, you can generate site keys that will return an assessment score that you define https://cloud.google.com/recaptcha-enterprise/docs/faq#id_like_to_run_automated_tests_with_what_should_i_do

Dubbing answered 14/5, 2021 at 2:7 Comment(0)
E
0

Is it possible to force fail a recaptcha v3 for testing purposes(I.e. pretend to be a robot) by changing the user-agent like Googlebot/2.1 in developer tool.

Source to change the user agent (http://osxdaily.com/2013/01/16/change-user-agent-chrome-safari-firefox/)

recaptcha demo - https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php

Evolve answered 24/3, 2019 at 8:49 Comment(2)
I tried to simulate a Googlebot, but it not work. still get sore 0.9Rectangular
Googlebot/2.1 will pass on reCaptcha V3Shush
S
0

Changing the user-agent to robots like Googlebot/2.1 as explained by @Aran may not always trigger the captcha challenge.

A working solution that I found is to fill the form and then keep it open for some time without submiting. After about 30 min, when I submit the form, I am identified as a robot and need to take the recaptcha challenge.

Santinasantini answered 17/10, 2022 at 7:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.