Skip to content

[Bug]: Page.waitForURL('about:blank') fails if baseURL configured #36162

@danielwiehl

Description

@danielwiehl

Version

1.52.0

Steps to reproduce

  1. Clone my repo at https://github.com/danielwiehl/playwright-bug-reproducer-about-blank
  2. npm install
  3. npm run test
  4. See the test failure due to timeout in reproducer.spec.ts › should wait for "about:blank" page

Expected behavior

The promise returned by page.waitForURL('about:blank') should resolve when navigating to the about:blank page.

Actual behavior

The promise of page.waitForURL('about:blank') does not resolve when navigating to the about:blank using page.goto('about:blank'), resulting in a timeout error.

This bug was introduced in version 1.52.0 and only occurs if having configured a baseURL in the Playwright config. Version 1.51.1 is working as expected.

Reproducer:

export default defineConfig({
  ...
  use: {
    baseURL: 'https://playwright.dev',
  }
});

test('should wait for "about:blank" page', async ({page}) => {
  await page.goto('about:blank');
  await page.waitForURL('about:blank'); // does not resolve if `baseURL` is set
});

Additional context

No response

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-1370P
    Memory: 37.23 GB / 63.66 GB
  Binaries:
    Node: 22.16.0 - C:\dev\nodejs\node.EXE
    npm: 10.9.2 - C:\dev\nodejs\npm.CMD
    pnpm: 10.11.0 - C:\dev\nodejs\pnpm.CMD
  IDEs:
    VSCode: 1.99.3 - C:\dev\ide\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.2.15 - C:\dev\programs\cmder\vendor\git-for-windows\usr\bin\bash.EXE
  npmPackages:
    @playwright/test: 1.52.0 => 1.52.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions