diff --git a/tests/page/locator-frame.spec.ts b/tests/page/locator-frame.spec.ts index 2c7b13f880..55b68864b1 100644 --- a/tests/page/locator-frame.spec.ts +++ b/tests/page/locator-frame.spec.ts @@ -257,3 +257,12 @@ it('getBy coverage', async ({ page, server }) => { const input4 = page.frameLocator('iframe').getByTitle('Title'); await expect(input4).toHaveValue(''); }); + +it('wait for hidden should succeed when frame is not in dom', async ({ page }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21879' }); + it.fixme(); + await page.goto('about:blank'); + const button = page.frameLocator('iframe1').locator('button'); + expect(await button.isHidden()).toBeTruthy(); + await button.waitFor({ state: 'hidden', timeout: 1000 }); +});