Change8

v1.57.0

Breaking Changes
📦 playwrightView on GitHub →
1 breaking10 features1 deprecations🔧 13 symbols

Summary

Playwright 1.57 introduces the Speedboard report tab, switches to Chrome for Testing, adds a `webServer.wait` option, several new APIs, and removes the deprecated `Page#accessibility` method.

⚠️ Breaking Changes

  • Removed `Page#accessibility` from the API. Use alternative libraries such as Axe for accessibility testing. Update code to remove calls to `page.accessibility()` and integrate Axe per the Playwright accessibility guide.

Migration Steps

  1. Search and replace any usage of `page.accessibility()` with Axe integration as described in the Playwright accessibility testing guide.
  2. If you rely on the previous Chromium binary, note that Playwright now uses Chrome for Testing; no code changes required unless you need the old Chromium, in which case you can pin to an older Playwright version.
  3. To use the new `webServer.wait` feature, add a `wait` object with `stdout` or `stderr` regex to your test config.
  4. If you need to disable the new Service Worker network or console handling, set the environment variables `PLAYWRIGHT_DISABLE_SERVICE_WORKER_NETWORK=1` or `PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE=1` respectively.

✨ New Features

  • Speedboard tab in HTML reporter showing tests sorted by execution time.
  • Playwright now uses Chrome for Testing builds instead of Chromium for headed and headless browsers.
  • `testConfig.webServer.wait` field allows waiting for a regex match on server output, with optional named capture groups exposed as environment variables.
  • `testConfig.tag` property adds a tag to all tests in a run, useful for merging reports.
  • `worker.on('console')` event emits when console API methods are called inside a worker.
  • `worker.waitForEvent()` can be used to wait for console events from workers.
  • `locator.describe()` and new `locator.description()` method to set and retrieve a locator description; `Locator.toString()` now includes the description.
  • `steps` option added to `locator.click()` and `locator.dragTo()` to control number of mousemove events.
  • Service Worker network requests are now reported and can be routed through `BrowserContext` in Chromium, with opt‑out via `PLAYWRIGHT_DISABLE_SERVICE_WORKER_NETWORK`.
  • Service Worker console messages are dispatched through `worker.on('console')` with opt‑out via `PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE`.

🔧 Affected Symbols

Page#accessibilitytestConfig.webServer.waittestConfig.tagworker.on('console')worker.waitForEventlocator.describelocator.descriptionLocator.toStringlocator.click (steps option)locator.dragTo (steps option)Service Worker network handling in BrowserContextPLAYWRIGHT_DISABLE_SERVICE_WORKER_NETWORKPLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE

⚡ Deprecations

  • `Page#accessibility` was previously deprecated and has now been removed.