I have a button on a page that opens a popup (new tab). I can get this popup with a listener:
page.on('popup', async popup => {
console.log('popup => ' + await popup.url());
})
The problem is that the website opens it with an "about:blank" link, and later loads an URL.
I tried to wait a few seconds before get the url but it keeps showing a blank string.
page.on('popup', async popup => {
await page.waitForTimeout(10000);
console.log('popup => ' + await popup.url());
})
The main page after opens the popup, changes it URL. So im not able, yet, to get this URL sent to the popup.
Any idea? Thanks!