iMacros/Javascript - How to expose text area of recaptcha V2 when in iframe?

Jonth

New member
#1
I have a situation where I need to use 2Captcha to solve recaptcha for the site , but the recaptcha is unusually in its own frame. My normal .js I use in imacros for firefox fails to expose the "text area" to paste the token result into. How can this be overcome ?Presumably I just need to reference the frame but I am unsure how to do this as I am just starting with javascript and use a script that I paid a coder for . I have asked him but I dont think he is sure , or too busy perhaps ! The code below normally works to expose the text area to input the recaptcha token..

Code:
macro += "URL GOTO=javascript:((function(){var<SP>k=document.querySelector('[src^=\"https://www.google.com/recaptcha/api2/anchor?\"]').src.split('k=')[1].split('&')[0];document.getElementById('g-recaptcha-response').style.display='';document.getElementById('g-recaptcha-response').textContent=k;}))();" + "\n";
Any help would be greatly appreciated as this is has been a problem for a long time