v1.50.0
Breaking Changes📦 playwrightView on GitHub →
⚠ 2 breaking✨ 14 features🐛 1 fixes🔧 11 symbols
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.
⚠️ Breaking Changes
- `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.
- `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
- 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.
- 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.
- Review any custom source‑code update scripts to accommodate the new `testConfig.updateSourceMethod` values (`overwrite`, `3-way`).
✨ New Features
- Added `timeout` option to test steps to specify a maximum run time for an individual step.
- Introduced `test.step.skip()` method to disable execution of a specific test step.
- Extended `expect(locator).toMatchAriaSnapshot()` to support storing ARIA snapshots in separate YAML files.
- Added `expect(locator).toHaveAccessibleErrorMessage()` assertion for checking elements with an ARIA `errormessage`.
- Added `changed` enum value to `testConfig.updateSnapshots` to update only changed snapshots.
- Introduced `testConfig.updateSourceMethod` option with `overwrite` and `3-way` modes for updating source code.
- Added `gracefulShutdown` field to `testConfig.webServer` to specify a custom process kill signal.
- Exposed `testStep.attachments` in the reporter API to retrieve all attachments created by a step.
- Added `pathTemplate` option for `toHaveScreenshot` and `toMatchAriaSnapshot` assertions in `testConfig.expect`.
- Updated default HTML reporter UI to improve display of attachments.
- Added new UI button for picking elements to generate ARIA snapshots.
- Enhanced trace UI to show additional details such as keys pressed alongside action API calls.
- Disabled canvas content display in traces by default; can be enabled via the `Display canvas content` setting.
- Enhanced Call and Network panels to display additional time information.
🐛 Bug Fixes
- Disabled canvas content rendering in traces by default to avoid error‑prone behavior.
🔧 Affected Symbols
expect(locator).toBeEditablelocator.isEditabletestConfig.updateSnapshotstestConfig.updateSourceMethodtestConfig.webServer.gracefulShutdowntestStep.attachmentstest.step.skipexpect(locator).toMatchAriaSnapshotexpect(locator).toHaveAccessibleErrorMessagetoHaveScreenshot.pathTemplatetoMatchAriaSnapshot.pathTemplate