Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ playwright-cli tracing-start # start trace recording
playwright-cli tracing-stop # stop trace recording
playwright-cli video-start [filename] # start video recording
playwright-cli video-chapter <title> # add a chapter marker to the video
playwright-cli video-show-actions # annotate each action with a callout in the video
playwright-cli video-hide-actions # stop annotating actions in the video
playwright-cli video-stop # stop video recording
playwright-cli show # open the visual dashboard
playwright-cli show --annotate # launch dashboard for UI review / design feedback
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"test": "playwright test"
},
"devDependencies": {
"@playwright/test": "1.61.0-alpha-1778188671000",
"@playwright/test": "1.61.0-alpha-1781023400000",
"@types/node": "^25.2.1"
},
"dependencies": {
"playwright": "1.61.0-alpha-1778188671000",
"playwright-core": "1.61.0-alpha-1778188671000"
"playwright": "1.61.0-alpha-1781023400000",
"playwright-core": "1.61.0-alpha-1781023400000"
},
"bin": {
"playwright-cli": "playwright-cli.js"
Expand Down
16 changes: 16 additions & 0 deletions skills/playwright-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ playwright-cli video-start video.webm
playwright-cli video-chapter "Chapter Title" --description="Details" --duration=2000
playwright-cli video-stop

# annotate each subsequent action (click, type, ...) with a callout naming the action and highlighting the target
playwright-cli video-show-actions --duration=600 --position=top-right
playwright-cli video-hide-actions

# launch the dashboard for UI review / design feedback — user annotates the page, you receive the annotated screenshot, snapshot, and notes
playwright-cli show --annotate

Expand Down Expand Up @@ -231,6 +235,18 @@ playwright-cli -s=msedge detach
playwright-cli delete-data
```

## URLs with `&` on Windows

On Windows, `cmd.exe` and PowerShell treat `&` as a command separator, so URLs with multiple query parameters get truncated before `playwright-cli` runs. Escape `&` with `^&` in `cmd.exe`, or use `--%` in PowerShell:

```batch
playwright-cli goto "https://example.com/?a=1^&b=2"
```

```powershell
playwright-cli --% goto "https://example.com/?a=1&b=2"
```

## Snapshots

After each command, playwright-cli provides a snapshot of the current browser state.
Expand Down
4 changes: 2 additions & 2 deletions skills/playwright-cli/references/spec-driven-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Collect the generated code and write the test file at the path given in the spec
// seed: tests/seed.spec.ts
import { test, expect } from './fixtures'; // or '@playwright/test' if no fixtures file

test.describe('Singing in and out', () => {
test.describe('Signing in and out', () => {
test('should sign in', async ({ page }) => {
// 1. Navigate to the application
// (handled by the seed fixture)
Expand Down Expand Up @@ -261,7 +261,7 @@ The test is paused at the start. Step forward or run to until just before the fa
```bash
playwright-cli snapshot # did the element change / move / rename?
playwright-cli console # app-side errors?
playwright-cli network # failed request? wrong payload?
playwright-cli requests # failed request? wrong payload?
playwright-cli show --annotate # ask the user to point somewhere
```

Expand Down
4 changes: 2 additions & 2 deletions skills/playwright-cli/references/storage-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The saved file contains:
"value": "abc123",
"domain": "example.com",
"path": "/",
"expires": 1735689600,
"expires": 1893456000,
"httpOnly": true,
"secure": true,
"sameSite": "Lax"
Expand Down Expand Up @@ -92,7 +92,7 @@ playwright-cli cookie-set session abc123
playwright-cli cookie-set session abc123 --domain=example.com --path=/ --httpOnly --secure --sameSite=Lax

# Cookie with expiration (Unix timestamp)
playwright-cli cookie-set remember_me token123 --expires=1735689600
playwright-cli cookie-set remember_me token123 --expires=1893456000
```

### Delete a Cookie
Expand Down
2 changes: 1 addition & 1 deletion skills/playwright-cli/references/video-recording.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ playwright-cli video-start recordings/checkout-test-run-42.webm
### 2. Record entire hero scripts.

When recording a video for the user or as a proof of work, it is best to create a code snippet and execute it with run-code.
It allows pulling appropriate pauses between the actions and annotating the video. There are new Playwright APIs for that.
It allows inserting appropriate pauses between the actions and annotating the video. There are new Playwright APIs for that.

1) Perform scenario using CLI and take note of all locators and actions. You'll need those locators to request their bounding boxes for highlight.
2) Create a file with the intended script for video (below). Use pressSequentially w/ delay for nice typing, make reasonable pauses.
Expand Down
Loading