Reading issue
← Back to microsoft/playwright
microsoft / playwright · Issue No. 42719
1.63.0
import { expect, test } from "@playwright/test";
// fails
test("visibility: hidden", async ({ page }) => {
await page.setContent(`
<iframe name='asdf'
srcdoc="<p>Hidden iframe content</p>"
style='visibility: hidden'>
</iframe>
`);
await expect(page.frameLocator("[name='asdf']").locator("p")).toBeHidden();
});
// passes
test("display: none", async ({ page }) => {
await page.setContent(`
<iframe name='asdf'
srcdoc="<p>Hidden iframe content</p>"
style='display: none'>
</iframe>
`);
await expect(page.frameLocator("[name='asdf']").locator("p")).toBeHidden();
});
the locator is considered hidden in both tests
the locator is considered visible in the visibility: hidden test even though it's not actually visible
No response
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11500H @ 2.90GHz
Memory: 6.48 GB / 31.20 GB
Binaries:
Node: 26.3.1 - C:\Users\user\AppData\Roaming\node\node.EXE
npm: 11.16.0 - C:\Users\user\AppData\Roaming\node\npm.CMD
IDEs:
VSCode: 1.134.0 - C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
Languages:
Bash: 5.2.21 - C:\WINDOWS\system32\bash.EXE
npmPackages:
@playwright/test: 1.63.0 => 1.63.0
playwright: 1.63.0 => 1.63.0
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.