diff --git a/packages/playwright-core/src/server/page.ts b/packages/playwright-core/src/server/page.ts index 80270f2ea0a1a..143cb6b909d90 100644 --- a/packages/playwright-core/src/server/page.ts +++ b/packages/playwright-core/src/server/page.ts @@ -489,6 +489,12 @@ export class Page extends SdkObject { } private async _performWaitForNavigationCheck(progress: Progress) { + // Allow skipping navigation checks for applications that manage navigation non-standardly. + // Some downstream users rely on this for scenarios like Electron apps with custom request + // interception and multi-window navigation handling. + if (process.env.PLAYWRIGHT_SKIP_NAVIGATION_CHECK) + return; + const mainFrame = this.frameManager.mainFrame(); if (!mainFrame || !mainFrame.pendingDocument()) return;