v1.56.0
Breaking Changes📦 playwrightView on GitHub →
⚠ 1 breaking✨ 10 features⚡ 1 deprecations🔧 8 symbols
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.
⚠️ Breaking Changes
- Event browserContext.on('backgroundpage') has been deprecated and will no longer be emitted; browserContext.backgroundPages() now returns an empty list.
Migration Steps
- Remove any listeners attached to browserContext.on('backgroundpage') as the event is no longer emitted.
- Update code that relies on browserContext.backgroundPages() to handle an empty list or use alternative mechanisms (e.g., listen to 'page' events).
- If you used the removed background page event, refactor logic to track pages via the 'page' event.
- If you used the previous CLI test selection, replace it with the new --test-list or --test-list-invert flags.
✨ New Features
- Playwright Agents introduced: planner, generator, and healer agents to guide LLMs through test creation.
- New API methods page.consoleMessages() and page.pageErrors() for retrieving recent console messages and page errors.
- New API method page.requests() for retrieving recent network requests.
- Added CLI flags --test-list and --test-list-invert to manually specify tests from a file.
- HTML reporter option to disable the \"Copy prompt\" button.
- HTML reporter and UI Mode option to merge files, collapsing test and describe blocks into a unified list.
- UI Mode option mirroring --update-snapshots behavior.
- UI Mode option to run only a single worker at a time.
- Aria snapshots now render and compare input placeholder attributes.
- Environment variable PLAYWRIGHT_TEST added to worker processes for testing status discrimination.
🔧 Affected Symbols
BrowserContext.on('backgroundpage')BrowserContext.backgroundPagesPage.consoleMessagesPage.pageErrorsPage.requestsHTMLReporterUIModePLAYWRIGHT_TEST environment variable⚡ Deprecations
- browserContext.on('backgroundpage') event is deprecated and will not be emitted.