Skip to content

[Feature]: Allow URLPattern for page.waitForURL #38666

@louwers

Description

@louwers

🚀 Feature Request

Right now page.waitForURL() accepts a string, RegExp or a function.

Now that URLPattern is supported by Node.js it makes sense to accept it as a parameter.

Example

await page.click('a.delayed-navigation');
await page.waitForURL(new URLPattern({pathname: "/widget1"});

Motivation

This is a much nicer to use API than the alternatives.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions