github microsoft/playwright-cli v0.1.2

latest release: v0.1.3
7 hours ago

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:

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 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:

$ 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:

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:

# 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

Don't miss a new playwright-cli release

NewReleases is sending notifications on new releases.