xk6-browser icon indicating copy to clipboard operation
xk6-browser copied to clipboard

Add support for page.waitForURL

Open mdcruz opened this issue 1 year ago • 0 comments

Feature Description

According to the Playwright documentation, page.waitForNavigation() has been deprecated. We have been using this in our examples and recommendations so far.

For example:

await Promise.all([
      page.waitForNavigation(),
      page.locator('input[type="submit"]').click(),
    ]);

Playwright has created page.waitForURL() in favour of page.waitForNavigation().

The new usage can look like this:

await Promise.all([
      page.locator('input[type="submit"]').click(),
      page.waitForURL('**/test'),
]);

We should also try and support this in future versions of k6 browser.

Suggested Solution (optional)

No response

Already existing or connected issues / PRs (optional)

No response

mdcruz avatar Mar 13 '23 16:03 mdcruz