46

Is it possible to set some flag in my browser so that I always get the RECAPTHCA image challenges? Sometimes when you click on the "I am not a robot" button, it gives you a pop up challenge with something like "Click all the images which contain a car", but sometimes it just checks off the box and takes your word for the fact that you're not a robot.

I would like to test the UI of my tool both on a desktop and on mobile, and make sure that the challenge pop up shows up and interacts well with other elements of the page.

In other words, as a developer, I want Google to think that I'm a robot so that it always gives me the visual challenge.

Is there any way to force this behavior?

Note: I've done some research and was unable to find any relevant questions or blog posts that might yield an answer.

4
  • 2
    A bit late, but have you tried to test in an anonymous window? Whenever I access through an anonymous window it asks me to do the challenge. Apr 26, 2019 at 16:20
  • 2
    I find it baffling that Google doesn't offer this option as an input flag to the grecaptcha.execute() method (or something). Pretty frustrating Apr 6, 2020 at 14:13
  • @LucasBasquerotto Thank you! A private/incognito window is the only thing here that has worked for me.
    – Luc
    May 30, 2022 at 4:19
  • Same problems here. Only way I can get it to fire is after doing everything here, turns out I submitted my own form 20+times, lol, which looks sus enough that the ReCapcha started firing. (im dealing with a form in a popup that the ReCapcha does not display over top of correctly) - We should not have to do any of this. I am surprised Google has not added some simple solution like patching site.com/#fireReCapcha into the url to trigger it. I've fired that off to the Google ReCapcha support dept and ref this Stack. (maybe we could all do that?) Mar 9, 2023 at 3:05

7 Answers 7

26

The methods told here should generally work, but there is no guarantee of the same. There is a very easy way to guarantee that Google reCAPTCHA challenge always show up. All you need to do is to add a custom BOT device in developer tools and then use the same to test.

  1. In Chrome Dev Tools, open Settings. Open Devices after that.
  2. Add a custom device with any name and set User Agent String to Googlebot/2.1
  3. Finally, in Device Mode, at the left of the top bar, choose the custom device that you created (the default is Responsive).

Thanks to the SO users who had put it up in the answer and follow-up comment here.

11
  • 1
    I tried all of the suggestions on this page so far and this was the first that worked for me on Google Chrome on Mac, V85 as a user. Thank you!
    – Kreidol
    Oct 7, 2020 at 23:34
  • 1
    Worked perfectly!
    – Dan H
    Nov 5, 2020 at 22:08
  • 6
    Not working in 2021. ReCaptcha v3 will still let the google bot pass as it has a score of 0.9 when emulating in Chrome. Apr 12, 2021 at 14:27
  • 1
    This solution doesn't prevent captcha from passing. It causes the challenge to show up, so that you can test that it can trigger at all. Did you mean that it no longer triggers the challenge for you in v3?
    – Kreidol
    Jul 9, 2021 at 23:28
  • 2
    I got this working by using user agent Googlebot/2.1 (+http://www.google.com/bot.html). Googlebot/2.1 by itself isn't actually on the Google crawler list that @Kreidol linked to.
    – adam-p
    Oct 26, 2021 at 14:56
18

I too have been looking for similar functionality. While I have not found a code-based solution to force the challenge, I have found a fairly reliable hack.

Grab a VPN tool (I happen to use IP Vanish), then connect to a remote server (I've had success connecting to China). Then, open up a private/incognito window and fill out your form.

From my testing, the combination of the remote IP and the blank user session triggers the challenge.

2
  • Good answer, it recreates the situation of an attacking bot. I triggered the challenge every time using Incognito + VPN
    – Cenlan
    Nov 20, 2019 at 20:20
  • Challenge displayed just be using a VPN, good thinking!
    – babis21
    Jul 6, 2021 at 18:09
7

Here are a few things you can try. In my experience all of them will increase your chances of getting a challenge.

  1. Log in at https://www.google.com/recaptcha/admin and edit your reCAPTCHA settings. Under Security Preference choose Most Secure.
  2. Use a VPN + incognito mode (as suggested here)
  3. If you're using the invisible reCAPTCHA, I found that using explicit rendering + immediately calling grecaptcha.execute() after grecaptcha.render() will usually trigger the challenge. I suspect this is because Google's AI expects a user interaction of some kind to trigger grecaptcha.execute() and not the onloadCallback itself.
3
  • Hi I am using google recaptcha invisible type. I have called grecaptcha.execute() after grecaptcha.render() which is happening after ajax response. but when I render again it give me error that "recaptcha element already exist". Could you please help me solving this
    – KV90
    May 29, 2020 at 14:08
  • 1
    We should not have to do this. I am surprised Google has not added some simple solution like patching site.com/#fireReCapcha into the url to trigger it. I've fired that off to the Google ReCapcha support dept and ref this Stack. (maybe we could all do that?) Mar 9, 2023 at 3:04
  • Security Preference options don't even exist in the admin console anymore as of this posting. There are surprisingly few options.
    – Longblog
    May 22, 2023 at 22:36
3

2022 and later

It seems to be increasingly harder to trigger the recaptcha challenge of the invisible recaptcha. Using the UserAgent of a bot, going into incognito mode is not enough anymore. A VPN might work, but I do not trust free VPN services.

I am however still able to trigger the recaptcha challenge when I'm only using the keyboard while filling in the form fields and pressing the submit button with the enter key. It seems like the Google Recaptcha is now also following your mouse movements to determine if you are a real user. Make sure to never hover your mouse cursor over the webpage and only use the keyboard.

1
0

I use reCAPTCHA's SDK in Android, and I also encounter the need to force validation when testing. I tried it many times. At last, I turned off or turned on the flight mode, which can be verified in the retest. I guess it may be that Google put my IP on the white list in the background, so I passed the verification without any challenge.

0

That should be possible, because when LinkedIn forcefully logged out an user for excessive usage, it showed captcha on next login, and there always was the challenge.

Unfortunately, LinkedIn switched from Recaptcha to another provider just few days ago, so I cannot just look up into their JavaScript code. It is what makes me believe that Recaptcha does have an undocumented option to force the challenge.

-1

I was looking for something like this and after some research plus trial & error what worked for me is to use the invisible recaptcha and invoke the challenge with JS.

After you have loaded the recaptcha script on your page then do

grecaptcha.execute()

and the challenge might be invoked.

4
  • 9
    I don't think this is true. The .execute function will indeed cause the invisible recaptcha to evaluate and obtain a token, but it is still out of your hands whether that generates a visual challenge. I can confirm because I am using this method and it does not generate a challenge -- at least not any more often than normal (reloading the challenge many times will usually generate one). I wonder if maybe after so many times of initializing recaptcha in a row that you simply started getting receiving the challenges as a coincidence?
    – Matt
    Nov 29, 2018 at 21:18
  • I just called this function until I got a challenge. 😬 Jun 24, 2019 at 14:33
  • this doesn't work, it gives about the same probability of showing the challenge as clicking the checkbox recaptcha. Nov 22, 2019 at 17:51
  • I haven't tried this again in a long time. Based on your answers I guess it's not working anymore. I remember that back in the day I did et the results I was expecting.... Nov 26, 2019 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.