Open dgozman opened 2 days ago
As a workaround, try running with PLAYWRIGHT_SKIP_NAVIGATION_CHECK=1 npx playwright test
and let me know whether that helps.
@dgozman Yes using PLAYWRIGHT_SKIP_NAVIGATION_CHECK
environment variable works. This is the route we were going to take to be able to use 1.49
but we don't think it's a long-term solution.
I'm not sure if it is related, but it doesn't work for me. Tried it on @playwright/test@1.49.0
PLAYWRIGHT_SKIP_NAVIGATION_CHECK=1 playwright test test.spec.ts --debug
Version
1.49.0
Steps to reproduce
Reported by @chrisbottin in https://github.com/microsoft/playwright/pull/32899#issuecomment-2506437082.
The problem we are having is when we click on a link which triggers the
beforeunload
dialog, after we dismiss the dialog and try to interact with the page again, we get timeout errors.Here is a simple test replicating the error ...
Expected behavior
Test passes.
Actual behavior
The test fails on the line
await page.getByRole('menuitem', {name: 'Teams'}).click({timeout: 1000});
with the error:Additional context
During debugging, I noticed the
pendingDocument()
is set to{documentId: undefined, request: undefined}
If this line https://github.com/microsoft/playwright/blob/b5bd543cc6935f62732da3b6183bd319eb2bdc2a/packages/playwright-core/src/server/page.ts#L472 is changed to the following, our problem disappears:
Environment