Migrating to Playwright v1.56.0
Version v1.56.0 introduces 1 breaking change. This guide details how to update your code.
Released: 10/6/2025
1
Breaking Changes
4
Migration Steps
8
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
BrowserContext.on('backgroundpage')BrowserContext.backgroundPagesPage.consoleMessagesPage.pageErrorsPage.requestsHTMLReporterUIModePLAYWRIGHT_TEST environment variableBreaking Changes
●Issue #1
Event browserContext.on('backgroundpage') has been deprecated and will no longer be emitted; browserContext.backgroundPages() now returns an empty list.
Migration Steps
- 1Remove any listeners attached to browserContext.on('backgroundpage') as the event is no longer emitted.
- 2Update code that relies on browserContext.backgroundPages() to handle an empty list or use alternative mechanisms (e.g., listen to 'page' events).
- 3If you used the removed background page event, refactor logic to track pages via the 'page' event.
- 4If you used the previous CLI test selection, replace it with the new --test-list or --test-list-invert flags.
Release Summary
This release adds Playwright Agents, several new page APIs, UI/HTML reporter enhancements, and removes the backgroundpage event, requiring migration for any existing background page handling.
Need More Details?
View the full release notes and all changes for Playwright v1.56.0.
View Full Changelog