How to insert a reCaptcha v2 solution
If you want to submit a form that requires a reCaptcha v2 verification, you will need to:
solve the captcha through a
RECAPTCHAblock (you need to buy credit for one of the supported captcha solvers first). Let's assume you saved the challenge solution in the
open the browser and navigate to the page
EXECUTEJSblock and write
document.getElementById('g-recaptcha-response').innerHTML = '<SOLUTION>';
RECAPTCHA "https://www.google.com/recaptcha/api2/demo" "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-" -> VAR "SOLUTION" BROWSERACTION Open NAVIGATE "https://www.google.com/recaptcha/api2/demo" EXECUTEJS "document.getElementById('g-recaptcha-response').innerHTML = '<SOLUTION>';" ## Now you can fill and submit your form
Sometimes the reCaptcha must trigger a validation function after you inserted it inside the textarea.
You can easily see if that is the case by looking at the div using inspect element. For example on the reCaptcha demo site you can see this:
<div id="recaptcha-demo" class="g-recaptcha" data-sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-" data-callback="onSuccess"> </div>
onSuccessfunction is the callback function when the challenge is solved.
In this case you just need to add
onSuccess();to your script and it will look like this:
document.getElementById('g-recaptcha-response').innerHTML = '<SOLUTION>'; onSuccess();