This forum is in read-only mode. The new forum is live at and registrations are open!

How to insert a reCaptcha v2 solution

  • Admin

    If you want to submit a form that requires a reCaptcha v2 verification, you will need to:

    • solve the captcha through a RECAPTCHA block (you need to buy credit for one of the supported captcha solvers first). Let's assume you saved the challenge solution in the SOLUTION variable.

    • open the browser and navigate to the page

    • add an EXECUTEJS block and write

    document.getElementById('g-recaptcha-response').innerHTML = '<SOLUTION>';


              "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-" -> VAR "SOLUTION"
    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"

    The onSuccess function 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>';

  • It is very hard for me to understand how it works, could you please use the full code as an example here? I appreciate it.

  • @insanebeeftw i need too

  • hey ruri
    any idea for this situation? i means it wont let submit form or click button of login until Recaptcha get "Checked"

    alt text

  • @Ruri U said that the recaptcha tick may not show when u even after u solve the captcha with selenium. In my case the login button is disabled until the Recaptcha is selected. What can be done?

  • Admin

    Submit the form manually through Element Action submit

  • @Ruri that is what im talk about,submit from Form,just have result of "Please solve captcha"

  • Admin

    ElementAction > Submit
    address the correct form element through Tag or Css selector

  • @Ruri said in How to insert a reCaptcha v2 solution:

    ElementAction > Submit
    address the correct form element through Tag or Css selector

    sir i know this,its what i'm talk about,in this situation,website wont accept solving captcha untill the captcha button was checked,if use submit only recive (captcha not solved,or captcha problem) error,not specific in one target,in every form that be like this,its same

  • What does this mean is it not working

  • Instructions are unclear, done that, and still in the browser it asks for captcha validation when submiting the forms.

Log in to reply