Cannot find the right callback function

nyck_de_vries

New member
I cannot figure out how to solve a captchav2 with Selenium.
I picked for testing the Spotify (spotify.com/us/signup) website.
I inject the token inside the HTML and I call the callback function which I retrived typing ___grecaptcha_cfg.clients['0'] in the Chrome Dev Console.
This is my code. But when i submit the form after this code, the captcha is not solved.
The error in the console is HTTP 400.
Java:
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("document.getElementById(\"g-recaptcha-response\").innerHTML=\"" + tokenID + "\";");
threadSleep();
js.executeScript("___grecaptcha_cfg.clients['0']['I']['I']['callback']('" + tokenID + "')");
 

Attachments

  • Capture.PNG
    Capture.PNG
    23 KB · Views: 20
Last edited by a moderator:

jan

New member
Same problem here. The callback function for Recaptcha V2 returns 400 with a "Checkbox score below defined threshold." response.
The page uses Recaptcha Enterprise with V2 and V3 present.