diff --git a/tests/page/page-navigation.spec.ts b/tests/page/page-navigation.spec.ts index 07571a32b5..eb85adad01 100644 --- a/tests/page/page-navigation.spec.ts +++ b/tests/page/page-navigation.spec.ts @@ -32,3 +32,28 @@ it('should work with cross-process _blank target', async ({ page, server }) => { await page.goto(server.EMPTY_PAGE); await page.click('"Click me"'); }); + +it('should work with _blank target in form', async ({ page, server, browserName }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/18392' }); + it.fixme(browserName === 'webkit'); + server.setRoute('/done.html?', (req, res) => { + res.end(`Done`); + }); + await page.goto(server.EMPTY_PAGE); + + page.setContent(`
`); + await Promise.all([ + page.waitForEvent('popup'), + page.click('"Click me"') + ]); + + page.setContent(``); + await Promise.all([ + page.waitForEvent('popup'), + page.click('"Click me"') + ]); +});