From 03b15f6550442c363c5f517b64436b5257634148 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 30 Jan 2023 08:37:05 -0800 Subject: [PATCH] test: submit form with target=_blank (#20462) #18392 --- tests/page/page-navigation.spec.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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"') + ]); +});