Change8

Migrating to Playwright v1.52.0

Version v1.52.0 introduces 4 breaking changes. This guide details how to update your code.

Released: 4/17/2025

4
Breaking Changes
3
Migration Steps
10
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

LocatorAssertions.toContainClassAriaSnapshot (properties /children, /url)TestProject.workersTestConfig.failOnFlakyTestsTestResult.annotationsAPIRequest.newContext (maxRedirects)HTMLReporter filteringPage.routeRoute.continueBrowserContext.addCookies

Breaking Changes

Issue #1

`page.route()` glob URL patterns no longer support `?` wildcard; it now matches a literal question‑mark character.

Issue #2

`page.route()` glob URL patterns no longer support range/set syntax `[]`; use regular expressions instead.

Issue #3

`route.continue()` can no longer override the `Cookie` header; the header is ignored and cookies are taken from the browser’s cookie store. Use `browserContext.addCookies()` to set custom cookies.

Issue #4

macOS 13 is deprecated and will no longer receive WebKit updates; upgrade the OS to a newer version to continue receiving updates.

Migration Steps

  1. 1
    Replace any `?` wildcards or `[]` range/set patterns in `page.route()` calls with equivalent regular expressions.
  2. 2
    Remove attempts to set a `Cookie` header in `route.continue()`; instead call `browserContext.addCookies()` with the desired cookies before navigation.
  3. 3
    If your CI runs on macOS 13, upgrade the operating system to a newer macOS version to continue receiving WebKit updates.

Release Summary

Playwright introduces new assertions, test runner options, and API enhancements while breaking glob pattern handling in routing and removing Cookie header overrides.

Need More Details?

View the full release notes and all changes for Playwright v1.52.0.

View Full Changelog