3

I am trying to call a function from my browser console. But every time I try, the console returns me an error message.

But I am able to reach that function via another function here it is:

enter image description here

as you can see the function is called "onCaptchaSubmitted"

This is what happens when I try to call it from the console:

enter image description here

Finally, this also shows how that function implemented:

I do not know how to call that function. There must be a way to call it directly but how?

Thanks for your help..

11
  • 1
    The bundled code most likely runs within its own function scope. So unless you explicitly bind the function you want to call to the window object, then you can't call it. Commented Aug 31, 2020 at 12:06
  • @Olian04 then how can I bind that function ? Commented Aug 31, 2020 at 12:19
  • 1
    Depends on your exact setup, but this works in general window.onCaptchaSubmitted = onCaptchaSubmitted; Commented Aug 31, 2020 at 12:20
  • @Olian04 it will work, but onCaptchaSubmitted has this inside. That can cause problems... Commented Aug 31, 2020 at 15:01
  • 1
    Might not be what you want to hear but captchas are designed to stop robots. Lots of smart people got together to I make this as complicated as possible by design. I've even seen sites have other anti-automation solutions after captchas.. I'm Not saying it's impossible but you're going to be facing an uphill struggle to get it working (sorry) Commented Aug 31, 2020 at 17:13

0