v0.1.2
microsoft/playwright-cliv0.1.2Mar 31, 2026by yury-s
AI Summary
Enhances video recording capabilities and introduces a CLI debugger for attaching to running tests.
Key Highlights
- Richer video recording with chapters and action annotations.
- New CLI debugger to attach to running Playwright tests for interactive debugging.
- Network state simulation (offline/online) and richer request inspection.
New Features
- Video chapter markers
- CLI debugger
- Network state simulation
Full Release Notes
## What's New ### 🎬 Richer Video Recording The `video-start` / `video-chapter` / `video-stop` commands now support action annotations and chapter markers backed by the new `page.screencast` API: ```bash playwright-cli open https://demo.playwright.dev/todomvc playwright-cli video-start receipt.webm playwright-cli video-chapter "Adding Todo Items" --description="We will add several items to the todo list." --duration=2000 playwright-cli fill e8 "Buy groceries" playwright-cli press Enter playwright-cli video-stop ``` See the [video recording reference](skills/playwright-cli/references/video-recording.md) for full examples. --- ### 🤖 CLI Debugger > [!NOTE] > Requires `@playwright/test` v1.59 or later. Coding agents can now attach to a running Playwright test for interactive debugging. Run the test with `--debug=cli`, then attach with `playwright-cli`: ```bash $ npx playwright test --debug=cli ### Debugging Instructions - Run "playwright-cli attach tw-87b59e" to attach to this test $ playwright-cli attach tw-87b59e ### Session `tw-87b59e` created, attached to `tw-87b59e`. ### Paused - Navigate to "/" at tests/example.spec.ts:4 $ playwright-cli --session tw-87b59e step-over ### Paused - Expect "toHaveTitle" at tests/example.spec.ts:7 ``` This pairs `playwright-cli`'s browser control with Playwright's test runner — perfect for automatically diagnosing and fixing failing tests in agentic workflows. --- ### 🌐 Network State & Request Inspection **Offline mode** — simulate network connectivity loss for testing offline scenarios: ```bash playwright-cli network-state-set offline # ... test your app's offline behavior ... playwright-cli network-state-set online ``` **Richer `network` output** — filter requests by URL pattern and optionally include headers and request bodies: ```bash # Filter to API requests only playwright-cli network --filter="/api/.*" # Include request headers and body for inspection playwright-cli network --filter="/api/.*" --request-headers --request-body ```