GlistenSTAR
GlistenSTAR

Reputation: 132

How can I click confirm button in invisible-recaptcha v2.[Solved using js callback function]

Everyone How are you? Now I am making the script to solve the recaptcha. Using python-capmonster module, I can get response. so I inputted the response in <Textarea> tag.

driver.execute_script('document.getElementById("g-recaptcha-response").innerHTML = "%s"' % response)

I can see it inputted correctly in textarea at selenium's browser.

but where is submit button? how can I click submit button?

That is my question. Will I need to click the submit(verify or skip) button in <iframe>?

It's really up in the air.

If you know some tip for this one, please help me. Thanks

To check step, please check this one. https://www.tixr.com/groups/beakandskiff/events/rainbow-kitten-surprise-60724 (click vip experience, increase amount and checkout, if you can meet recaptcha in the site)

Upvotes: 0

Views: 773

Answers (3)

GlistenSTAR
GlistenSTAR

Reputation: 132

thanks for visiting this problem. For solve problem, I tried to bounty to solve the problem. but I get correctly answer. I can get correctly answer from zennolab.com.

I found this problem using callback function. and submit button is hidden in callback function. For this problem, I discussed with ZennoLab.com stuff. finally I found the solution using 2captcha-python module. For refer this problem, I write down links below.

https://2captcha.com/2captcha-api#invisible
https://developers.google.com/recaptcha/docs/invisible
https://github.com/2captcha/2captcha-python.git
https://pypi.org/project/2captcha-python/
https://2captcha.com/demo/recaptcha-v2-invisible?level=low

Thanks for your attantion.

Upvotes: 0

angwrk
angwrk

Reputation: 420

You can try to submit the form by triggering the form's submit event using JavaScript. Something like this:

submit_button = driver.find_element_by_xpath("//button[contains(text(), 'Submit')]")
submit_button.click()

time.sleep(5)

driver.execute_script("document.getElementsByTagName('form')[0].submit();")

Upvotes: 0

alp
alp

Reputation: 11

I think the captcha is initialized and submitted via a javascript function. First of all, you can try the submit the textarea's form manually. If this doesn't work, you have to find the initializer (maybe not exist) or submit function in javascript files.

Upvotes: 0

Related Questions