1

Is there any way to run this function in puppeteer to submit the hcaptcha? I already loaded the h-captcha-response of the captcha into the textfield I just need to run the callback in puppeteer to submit the captcha-response...

Callback Function

Callback Function

Shreeya Chhatrala
  • 1,441
  • 18
  • 33
Nabil
  • 11
  • 2
  • Is `hcaptcha` available directly in the console, on this page ? – Jaspal Jan 31 '22 at 04:06
  • @Jaspal yes i can run window.hcaptcha – Nabil Jan 31 '22 at 04:11
  • you can use `hcaptcha.execute()` to trigger it programatically. Checkout the docs here https://docs.hcaptcha.com/configuration#hcaptchaexecutewidgetid – Jaspal Jan 31 '22 at 04:16
  • @Jaspal `hcaptcha.execute()` just open the captcha to solve again. But i want to call the callback function for handleSubmit because i already have the h-captcha-response i just want to know how to submit it..... – Nabil Jan 31 '22 at 04:27
  • hcaptcha.getResponseGet the captcha's id somehow and then poll it's response using `hcaptcha.getResponse` as mentioned in the docs right about `execute`. Other way around, you can pass `async: true` to `hcaptcha.execute()` for receiving a `Promise` back which triggers when it's resolved. So try to use `execute` for opening it up the first time .. – Silvan Bregy Feb 01 '22 at 14:09

0 Answers0