Change8

Migrating to Playwright v1.50.0

Version v1.50.0 introduces 2 breaking changes. This guide details how to update your code.

Released: 1/23/2025

2
Breaking Changes
3
Migration Steps
11
Affected Symbols

⚠️ Check Your Code

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

expect(locator).toBeEditablelocator.isEditabletestConfig.updateSnapshotstestConfig.updateSourceMethodtestConfig.webServer.gracefulShutdowntestStep.attachmentstest.step.skipexpect(locator).toMatchAriaSnapshotexpect(locator).toHaveAccessibleErrorMessagetoHaveScreenshot.pathTemplatetoMatchAriaSnapshot.pathTemplate

Breaking Changes

Issue #1

`expect(locator).toBeEditable()` and `locator.isEditable()` now throw if the target element is not `<input>`, `<select>`, or other editable elements. Update calls to handle or ensure correct element types.

Issue #2

`testConfig.updateSnapshots` default behavior changed: setting it to `all` now updates every snapshot instead of only changed/failed ones. Use the new enum value `changed` to retain previous behavior.

Migration Steps

  1. 1
    If your code uses `expect(locator).toBeEditable()` or `locator.isEditable()`, ensure the target element is an `<input>`, `<select>`, or another supported editable element, or catch the thrown error.
  2. 2
    When using `testConfig.updateSnapshots`, replace `all` with `changed` if you only want to update snapshots that have changed; keep `all` only if you intend to rewrite every snapshot.
  3. 3
    Review any custom source‑code update scripts to accommodate the new `testConfig.updateSourceMethod` values (`overwrite`, `3-way`).

Release Summary

Playwright introduces step timeouts, a skip API for test steps, expanded ARIA snapshot support, new accessibility assertions, and several UI and configuration enhancements, while tightening editable element checks and changing snapshot update defaults.

Need More Details?

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

View Full Changelog