Anticaptcha JS not working

Hi,

Firstly, great tool btw!

This one is related to Anticaptcha. I have the following steps on my macro (got the step from this link):
{
“Command”: “executeScript”,
“Target”: “(function(){var d=document.getElementById(“anticaptcha-imacros-account-key”);d||(d=document.createElement(“div”),d.innerHTML=“myAntiCaptchaApiKeyGoesHere”,d.style.display=“none”,d.id=“anticaptcha-imacros-account-key”,document.body.appendChild(d))})();”,
“Value”: “”
},
{
“Command”: “executeScript”,
“Target”: "(function(){var s=document.createElement(“script”);s.src=“https://cdn.antcpt.com/imacros_inclusion/recaptcha.js?"+Math.random();document.body.appendChild(s);})();”,
“Value”: “”
}

The above works when:

  1. I’m solving a captcha and these steps are on the earlier steps of the macro (e.g. before line 10) or
  2. When I’m executing the steps “adhoc-ly” (e.g. Execute command or Run from here).

IT DOESN’T WORK when these steps are on the last parts of my macro (e.g. executed on line 66). Any thoughts on this?

I have tried to eliminate the variables such as:

  1. I tried putting the above steps on a sub macro and calling it on my main macro – still doesn’t work
  2. I tried putting it on the same script as my main macro – still doesn’t work

Note: Only UI.Vision and Chropath extensions are active on my Chrome browser

Hope you can shed some light on this. Thank you!

The anti-captcha pays says that you need to “add these two instructions after a page loading and before filling form” - did you do this?

solving a captcha and these steps are on the earlier steps of the macro (e.g. before line 10)

For my understanding… if it works there, why not keep it before line 10?

Thank you for answering!

We’ll, the captcha is needed on the latter parts of the code. I tried putting it on a submacro (so that it mets the “requirement” before line # 10) but still it doesn’t work. It only runs when executed adhocly. I know it’s silly but I really don’t know what happening there.