pyppeteer
pyppeteer copied to clipboard
Is there a way to handle popup screens?
It seems that there is no way to see popup screens in headless pyppeteer, am I wrong or is there a way to access them?
Hi,
According to puppeteer documentation this can be done. The puppeteer says we need to do it something like this way.
const newPagePromise = new Promise(x => browser.once('targetcreated', target => x(target.page()))); await page.click('#abtn'); const popup = await newPagePromise; console.log(popup.url());
refer to url for more reference.
https://github.com/GoogleChrome/puppeteer/issues/2968#issuecomment-408526574
What does the corresponding python look like?