Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: add failing oopif cdp bug (#36329)
Simon Knott90c6921318b2
diff --git a/tests/library/chromium/oopif.spec.ts b/tests/library/chromium/oopif.spec.tsindex 54cd3e1a46..c062239a60 100644--- a/tests/library/chromium/oopif.spec.ts+++ b/tests/library/chromium/oopif.spec.ts@@ -371,6 +371,23 @@ it('should intercept response body from oopif', async function({ page, browser,expect(await response.text()).toBeTruthy();});+it.fail('should allow to re-connect to OOPIFs with CDP when iframes were there already', async ({ browserType, server }) => {+ it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/36095' });++ const cdpPort = 10123 + it.info().parallelIndex * 4;+ const hostBrowser = await browserType.launch({ cdpPort } as any);+ const hostPage = await hostBrowser.newPage();+ await hostPage.goto(server.PREFIX + '/dynamic-oopif.html');++ const browser = await browserType.connectOverCDP(`http://localhost:${cdpPort}`);+ const page = browser.contexts()[0].pages()[0];+ // can be fixed by reloading first+ // await page.reload();+ expect(page.frames().length).toBe(2);+ await assertOOPIFCount(browser, 1);+ expect(await page.frames()[1].evaluate(() => '' + location.href)).toBe(server.CROSS_PROCESS_PREFIX + '/grid.html');+});+async function assertOOPIFCount(browser: Browser, count: number) {if (browser.browserType().name() !== 'chromium')return;