← Back to microsoft/playwright
microsoft / playwright · Issue No. 42068
ToT
test('should close page while reload is committing', async ({ context, browserName }) => {
test.skip(browserName !== 'chromium');
for (let i = 0; i < 20; i++) {
const page = await context.newPage();
await expect(page.evaluate(() => {
location.reload();
return new Promise(() => {});
})).rejects.toThrow(/navigation/);
await page.close(); // intermittently hangs
}
});
The test passes fine.
page.close() hangs. To expose this behaviour, it's important to have the loop inside the test, running it without the loop but with --repeat-each doesn't expose it. I suppose it's linked to races within the context or something.
This started at https://github.com/microsoft/playwright/pull/41303.
Discovered through https://github.com/microsoft/playwright-python/pull/3161.
Simon's Mac
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.