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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ playwright-cli unroute [pattern] # remove route(s)

```bash
playwright-cli console [min-level] # list console messages
playwright-cli network # list all network requests since loading the page
playwright-cli requests # list all network requests since loading the page
playwright-cli request <index> # show details for a specific request
playwright-cli run-code <code> # run playwright code snippet
playwright-cli run-code --filename=f # run playwright code from a file
playwright-cli tracing-start # start trace recording
Expand All @@ -248,7 +249,7 @@ playwright-cli video-start [filename] # start video recording
playwright-cli video-chapter <title> # add a chapter marker to the video
playwright-cli video-stop # stop video recording
playwright-cli show # open the visual dashboard
playwright-cli show --annotate # open dashboard and prompt user for input
playwright-cli annotate # launch dashboard for UI review / design feedback
playwright-cli generate-locator <ref> # generate a playwright locator for an element
playwright-cli highlight <ref> # show a persistent highlight overlay
playwright-cli highlight <ref> --style= # highlight with a custom CSS style
Expand Down Expand Up @@ -555,6 +556,7 @@ The installed skill includes detailed reference guides for common tasks:
* **Request mocking** — intercept and mock network requests
* **Running Playwright code** — execute arbitrary Playwright scripts
* **Browser session management** — manage multiple browser sessions
* **Spec-driven testing (plan / generate / heal)** — drive tests from a written spec
* **Storage state (cookies, localStorage)** — persist and restore browser state
* **Test generation** — generate Playwright tests from interactions
* **Tracing** — record and inspect execution traces
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"test": "playwright test"
},
"devDependencies": {
"@playwright/test": "1.60.0-alpha-1777077614000",
"@playwright/test": "1.60.0-alpha-1777566615000",
"@types/node": "^25.2.1"
},
"dependencies": {
"playwright": "1.60.0-alpha-1777077614000"
"playwright": "1.60.0-alpha-1777566615000"
},
"bin": {
"playwright-cli": "playwright-cli.js"
Expand Down
14 changes: 8 additions & 6 deletions skills/playwright-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ playwright-cli unroute
```bash
playwright-cli console
playwright-cli console warning
playwright-cli network
playwright-cli requests
playwright-cli request 5
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli run-code --filename=script.js
playwright-cli tracing-start
Expand All @@ -162,8 +163,8 @@ playwright-cli video-start video.webm
playwright-cli video-chapter "Chapter Title" --description="Details" --duration=2000
playwright-cli video-stop

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

# generate a Playwright locator for an element from its ref or selector
playwright-cli generate-locator e5 --raw
Expand Down Expand Up @@ -351,7 +352,7 @@ playwright-cli open https://example.com
playwright-cli click e4
playwright-cli fill e7 "test"
playwright-cli console
playwright-cli network
playwright-cli requests
playwright-cli close
```

Expand All @@ -366,11 +367,11 @@ playwright-cli close

## Example: Interactive session

Ask the user to annotate the UI. User can provide contextual tasks or ask contextual questions using annotations:
Ask the user for UI review or design feedback. The user draws boxes on the live page and types comments; you receive the annotated screenshot, the snapshot of the marked region, and the user's notes. Use this whenever the user asks for "UI review", "design feedback", or to "ask the user what they think / want / mean":

```bash
playwright-cli open https://example.com
playwright-cli show --annotate
playwright-cli annotate
```

## Specific tasks
Expand All @@ -379,6 +380,7 @@ playwright-cli show --annotate
* **Request mocking** [references/request-mocking.md](references/request-mocking.md)
* **Running Playwright code** [references/running-code.md](references/running-code.md)
* **Browser session management** [references/session-management.md](references/session-management.md)
* **Spec-driven testing (plan / generate / heal)** [references/spec-driven-testing.md](references/spec-driven-testing.md)
* **Storage state (cookies, localStorage)** [references/storage-state.md](references/storage-state.md)
* **Test generation** [references/test-generation.md](references/test-generation.md)
* **Tracing** [references/tracing.md](references/tracing.md)
Expand Down
2 changes: 1 addition & 1 deletion skills/playwright-cli/references/playwright-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PLAYWRIGHT_HTML_OPEN=never npm run special-test-command

To debug a failing Playwright test, run it with `--debug=cli` option. This command will pause the test at the start and print the debugging instructions.

**IMPORTANT**: run the command in the background and check the output until "Debugging Instructions" is printed.
**IMPORTANT**: run the command in the background and check the output until "Debugging Instructions" is printed. Make sure to stop the command after you have finished.

Once instructions containing a session name are printed, use `playwright-cli` to attach the session and explore the page.

Expand Down
Loading
Loading