Skip to content

[Feature] Wait for URL #2142

@dialupdev

Description

@dialupdev

Hey team. Congrats on the 1.0 release! 🎉 Great stuff.

I often find myself using this pattern.

await page.click('.e2e-get-started-button');
await page.waitForSelector('.e2e-welcome-header');
expect(page.url()).toMatch('/start');

The reason for this is that my client-side router doesn't immediately change the URL after clicking on the button that triggers the navigation. I wonder if you'd be open to a new method on Page that looks something like this.

await page.click('.e2e-get-started-button');
await page.waitForURL('/start');

Not entirely sure about the API - in my example it's not 1:1 since I'm doing match vs. equality. But I'm curious what you think of the idea in general of waiting for a URL.

Thanks!

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