Reputation: 1
I am trying to click a button inside an iframe using pyppeteer - the python version of puppeteer However, I have drawn a blank. A simple page.click('#selector') does not seem to draw results and await page.waitForSelector('#selector') does not pick it up either
Could anyone advise? The buttons prior to the iframe work fine Thanks
Upvotes: 0
Views: 1525
Reputation: 151
You need to switch the context to iframe.
There's an example in other thread: Trying to click a button within an iframe with puppeteer
And there's a solution from pptr docs (probably they're similar to python): https://pptr.dev/#?product=Puppeteer&version=v9.0.0&show=api-class-frame
Upvotes: 0