1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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

Discussion in 'JavaScript' started by Fadetoblack2019, Feb 15, 2019.

  1. #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..

    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";
    Code (JavaScript):
    .. Any help with this would be greatly appreciated as this has been a problem for a long time
    SEMrush
     
    Last edited: Feb 15, 2019
    Fadetoblack2019, Feb 15, 2019 IP
    SEMrush