Skip to content

Navigation timeout of Playwright is disabled by default #2954

@henrypoon

Description

@henrypoon

What are you trying to achieve?

Keep the timeout condition that Playwirght has - 30s by default and it's set to 0 i.e. disabled in DEBUG mode if no custom value is provided.

What do you get instead?

Navigation timeout is disabled by default as setDefaultNavigationTimeout is set by getPageTimeout which has a default value of 0.

Details

I've been trying to debug a potential page crash issue in CI, however, the test just hangs there forever until it got killed. I'd expect to still have the timeout enabled by default or keep it as Playwright does.

defaults in Playwright.js

    const defaults = {
      // options to emulate context
      emulate: {},

      browser: 'chromium',
      waitForAction: 100,
      waitForTimeout: 1000,
      pressKeyDelay: 10,
      fullPageScreenshots: false,
      disableScreenshots: false,
      uniqueScreenshotNames: false,
      manualStart: false,
      getPageTimeout: 0,
      waitForNavigation: 'load',
      restart: false,
      keepCookies: false,
      keepBrowserState: false,
      show: false,
      defaultPopupAction: 'accept',
      ignoreHTTPSErrors: false, // Adding it here o that context can be set up to ignore the SSL errors
    };
  • CodeceptJS version: 3.0.7
  • NodeJS Version: 12.20.1
  • Operating System: MacOS Big Sur
  • Playwright

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions