Python Captcha solved by anti captcha but can't passing response

Pharirmi

New member
I am using anti captcha api for solve google captcha. My captcha is solving through anticaptcha api and getting captcha response after solved captcha. I using this driver.execute_script("document.getElementById('g-recaptcha-response').innerHTML = '" + g_response + "';") for pass captcha response but nothing happening see the picture:

1630395184361.png


captcha is solving but I need to click on verify button by passing captcha response so I can go to the next page. here is my code:

Code:
email = driver.find_element_by_xpath("")
email.send_keys('')
password = driver.find_element_by_xpath("")

password.send_keys('')

button = driver.find_element_by_css_selector('')

button.click()

    solver = recaptchaV2Proxyless()

    solver.set_verbose(1)

    solver.set_key("my api key ")

    solver.set_website_url("website url")

    solver.set_website_key("captcha site key")

    g_response = solver.solve_and_return_solution()

    if g_response != 0:

        print ("g-response: "+g_response)

    else:

        print ("task finished with error "+solver.error_code)

    time.sleep(3)

    driver.execute_script("document.getElementById('g-recaptcha-response').innerHTML = '" + g_response + "';") #I am using this for pass captcha response but captcha is solving but response not passing