pyppeteer icon indicating copy to clipboard operation
pyppeteer copied to clipboard

Is there a way to handle popup screens?

Open willstout opened this issue 6 years ago • 2 comments

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?

willstout avatar Feb 13 '19 18:02 willstout

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

aidataguy avatar May 16 '19 09:05 aidataguy

What does the corresponding python look like?

TommyYehCool avatar Dec 13 '19 07:12 TommyYehCool