Puppeteer Iframe issues


the iframe element exists on the page but ob is throwing an error when trying to switch to it… pls help

You don’t need to enter the recaptcha frame and click the button, you just have to insert the solution in the textarea and then trigger the js function to validate it.

This guy made a good guide for it

but the textarea is inside the recaptcha iframe @Ruri
and that guide doesnt solve my problem as well

also, switchtoframe in this exact same case works on ob1

If you do not have interest in read carefully, will be hard to help you. Please try the solutions offered here instead keep trying do wrong way…

If I can suggest, do not use a element exists for wait an element. You already have a block to do it. It is different purposes.

Instead switch frame, have you tried to insert solution by JS EXECUTE?

I mean, this thing that you are doing is a bit wrong…
No matter difference where text area is, because you will send as javascript.

After run JS blocks, you can click in button to submit the form
or call this fuction by JS block

About switch frame, if you really need it (no for captcha, be sure) you can launch with headless mode unabled, do not close browser and test it by yourself. Yet not used this function already, but surely works. You probably is missing on path of your needed switch frame

Hope that I help you

  1. ive only used ‘element exists’ to prove to you that my iframe xpath is correct and not wrong.

  2. i cant use ‘JS execute’ without switching to the iframe first because the text area for recptcha is inside an iframe.
    I cant get the element before switching to the iframe in which it exists.

  3. Neither can i click the button, nor can i call the function before switching to frame.

  4. I am working with headless mode off only and i can visually see the iframe, textarea and button on the selenium browser.

The problem i am trying to explain here is NOT about recaptcha, it is regarding iframes and OB2 not being able to switch to frame on the same site whereas OB1 is able to do so.

Really? sorry then, I’ve mentioned that because all captchas is inside a frame, and I haven’t problems with frames, not yet at least…

No needed to switch in iframe to insert solution. You can do it using your JS blocks
Actually, you can submit your form without clicking submit

You could show what is going on if you try execute JS and trigger the submit?

This issue is related to the fact that OB1 uses selenium and OB2 uses puppeteer so there might be discrepancies, please send me a demo config on a demo site where you show the bug so I can debug it properly, and open a github issue to keep track of it.

1 Like

M not sure how to do that demo stuff…
Coz i dont understand this stuff too well, i dont know any programming languages or anything.
On ob2 its not switching to frame and on ob1 its not inserting the captcha solution, if only i cud do half stuff here and half stuff there :joy::joy:

Your form/text area must be out of iframe, only recaptcha might be in iframe… thats why your execute js works.
Wont work if the text area itself is in an iframe

I need something to test this on otherwise I cannot debug it. And I’m going on vacation in a couple of days so I don’t really have time now, open an issue on github and I will look into it when I get back

1 Like

thanks for your time

i found this bug on another site too… though i cant mention the sites i think, and cant make demo sites.
is there any other way to report this?

I am on vacation now so I would not be able to test anyways, maybe wait until I come back and then I might check out the config via email.

1 Like

Okay, thanks !!!

Adding these arguments to launch options solved the issue: '--disable-web-security', '--disable-features=IsolateOrigins,site-per-process'

This will solve you problem