v1.59.0
📦 playwrightView on GitHub →
✨ 10 features🔧 13 symbols
Summary
This release introduces a powerful new page.screencast API for rich video capture and annotation, alongside significant interoperability features like browser binding and CLI debugging tools. Many APIs now support automatic cleanup via the await using syntax.
Migration Steps
- If using video recording configuration in playwright.config.ts, action annotations can now be enabled via the show.actions property within the video option.
- When using APIs that return disposables (e.g., page.route, page.addInitScript), switch from manual cleanup (e.g., route.dispose()) to using await using for automatic resource management.
✨ New Features
- Introduced new page.screencast API for unified page content capture, including screencast recordings, action annotations, visual overlays, real-time frame capture, and agentic video receipts.
- Screencast recording allows precise start/stop control as an alternative to browser.newContext({ recordVideo: ... }).
- Action annotations can be enabled via page.screencast.showActions() or configured in playwright.config.ts using the video option.
- Visual overlays allow adding chapter titles (page.screencast.showChapter) and custom HTML overlays (page.screencast.showOverlay) on top of the page.
- Real-time frame capture streams JPEG-encoded frames via an onFrame callback when starting screencast.
- New browser.bind() API makes a launched browser available for playwright-cli, @playwright/mcp, and other Playwright clients to connect to.
- A new Dashboard is accessible via playwright-cli show to list bound browsers, view their status, and interact with them.
- Coding agents can use npx playwright test --debug=cli to attach and debug tests over playwright-cli.
- Coding agents can use npx playwright trace to explore Playwright Trace viewer output from the command line, including opening, analyzing actions, and viewing snapshots.
- Many APIs now return async disposables, enabling the use of the await using syntax for automatic cleanup.