test('display popover when clicking the button', async ({ page }) => {
await page.goto('https://popoverexample.tiiny.site/');
await expect(page).toHaveTitle('Popover example');
const popover = page.getByText("I'm a popover");
await expect(popover).not.toBeVisible();
await page.getByRole('button').click();
await expect(popover).toBeVisible();
});
2. Run `npx playwright test --trace on`
3. The test pass ✅ (Playwright is able to view the activated popover)
4. Open the trace file in the viewer (ex: [trace.zip](https://github.com/user-attachments/files/17802174/trace.zip))
5. The popover is not visible in the trace's screenshot. So it looks like the [toplayer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer) is not present in the screenshots.
![Image](https://github.com/user-attachments/assets/4ecf2bc1-5205-4c94-ae13-a63ebd012ab4)
### Expected behavior
We should see the active popover in the trace's screenshots.
![Image](https://github.com/user-attachments/assets/513a3336-2ffa-4136-9b99-d4f83a446d19)
### Actual behavior
We don't see the popover (maybe the whole toplayer) in the trace's screenshots.
### Additional context
_No response_
### Environment
```shell
System:
OS: Windows 11 10.0.22621
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 6.32 GB / 31.74 GB
Binaries:
Node: 20.18.0 - C:\dev\devtools\nvm\nodejs\node.EXE
npm: 10.8.2 - C:\dev\devtools\nvm\nodejs\npm.CMD
IDEs:
VSCode: 1.95.3 - C:\Users\jb.muscat\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
npmPackages:
@playwright/test: ^1.48.2 => 1.48.2
Version
1.48.2
Steps to reproduce
test('display popover when clicking the button', async ({ page }) => { await page.goto('https://popoverexample.tiiny.site/'); await expect(page).toHaveTitle('Popover example'); const popover = page.getByText("I'm a popover"); await expect(popover).not.toBeVisible(); await page.getByRole('button').click(); await expect(popover).toBeVisible(); });