Scenario: Web form for developer app registration with two part workflow.
Page 1: Fill out developer app details and click on button to create Application ID, which
it looks like there's a simple 'page.popup' event
Page corresponding to "popup" window Emitted when the page opens a new tab or window.
const [popup] = await Promise.all([ new Promise(resolve => page.once('popup', resolve)), page.click('a[target=_blank]'), ]); const [popup] = await Promise.all([ new Promise(resolve => page.once('popup', resolve)), page.evaluate(() => window.open('https://example.com')), ]);
credit to this github issue for easier 'targetcreated'