Example of solving hCaptcha in an iMacros application with built-in Internet Explorer browser
How to solve an hCaptcha without installing an AntiCaptcha plugin by including an external JS file in an iMacros application.
For now, URL GOTO=javascript: may not work in some browsers. Therefore, this code won't work either. So try using Firefox or iMacros software instead.
For users who use a standalone iMacros application, we have created a JS file that contains a functionality for solving an hCaptcha in any browser, including IE, which is used by iMacros software.
This example closely resembles the reCAPTCHA 2 iMacros application-solving example. So, we've provided a straightforward example code for solving hCaptcha in the iMacros application.
VERSION BUILD=844 RECORDER=CR
'
URL GOTO=http://democaptcha.com/demo-form-eng/hcaptcha.html
'
' Insert your Anti-Captcha API key here
SET antiCaptchaApiKey YOUR-ANTI-CAPTCHA-API-KEY
'
' Fetch Anti-Captcha API key in TEXTAREA.[name=h-captcha-response] element
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:h-captcha-response CONTENT={{antiCaptchaApiKey}}
' Or you can place the API key in DIV#anticaptcha-imacros-account-key, it will also work
'URL GOTO=javascript:(function(){var<SP>d=document.getElementById("anticaptcha-imacros-account-key");d||(d=document.createElement("div"),d.innerHTML="{{antiCaptchaApiKey}}",d.style.display="none",d.id="anticaptcha-imacros-account-key",document.body.appendChild(d))})();
'
' Include the hcaptcha.js file with all the functional
URL GOTO=javascript:(function(){var<SP>s=document.createElement("script");s.src="https://cdn.antcpt.com/imacros_inclusion/hcaptcha.js?"+Math.random();document.body.appendChild(s);})();
'
' The same code goes further, as if you're using the AntiCaptcha extension
'
' Fill the text field with the test value
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:recaptcha_demo_form ATTR=NAME:demo_text CONTENT=iMacros<SP>test<SP>message
'
' Most important part: we wait 120 seconds until an AntiCatcha indicator
' with class "antigate_solver" gets in additional "solved" class
SET !TIMEOUT_STEP 120
TAG POS=1 TYPE=DIV ATTR=CLASS:"*antigate_solver*solved*"
'
' Send form
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:recaptcha_demo_form ATTR=TYPE:submit
If you encounter any difficulties while integrating the AntiCaptcha plugin with iMacros, please don't hesitate to reach out to us via theFeedback form!