chore: auto-update readme · microsoft/playwright-cli@528375e · GitHub
Skip to content

Commit 528375e

Browse files
committed
chore: auto-update readme
1 parent fd75ddc commit 528375e

10 files changed

Lines changed: 407 additions & 602 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 0 deletions

‎README.md‎

Lines changed: 66 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,22 @@ npm install -g @playwright/cli@latest
2727
playwright-cli --help
2828
```
2929

30-
> Note that you might need to force it to reclaim `playwright-cli` binary from our older MCP package.
31-
> ```bash
32-
> npm install -g @playwright/cli@latest --force
33-
> ```
30+
### Installing skills
31+
32+
Claude Code, GitHub Copilot and others will use the locally installed skills.
33+
34+
```bash
35+
playwright-cli install-skills
36+
```
37+
38+
### Skills-less operation
39+
40+
Point your agent at the CLI and let it cook. It'll read the skill off `playwright-cli --help` on its own:
41+
42+
```
43+
Test the "add todo" flow on https://demo.playwright.dev/todomvc using playwright-cli.
44+
Check playwright-cli --help for available commands.
45+
```
3446

3547
## Demo
3648

@@ -115,6 +127,7 @@ Manage your sessions as follows:
115127
```bash
116128
playwright-cli session-list # list all sessions
117129
playwright-cli session-stop [name] # stop session
130+
playwright-cli session-restart [name] # restart session
118131
playwright-cli session-stop-all # stop all sessions
119132
playwright-cli session-delete [name] # delete session data along with the profiles
120133
```
@@ -126,7 +139,7 @@ playwright-cli session-delete [name] # delete session data along with the pro
126139
### Core
127140

128141
```bash
129-
playwright-cli open [url] # open url
142+
playwright-cli open <url> # open url
130143
playwright-cli close # close the page
131144
playwright-cli type <text> # type text into editable element
132145
playwright-cli click <ref> [button] # perform click on a web page
@@ -186,38 +199,80 @@ playwright-cli tab-close [index] # close a browser tab
186199
playwright-cli tab-select <index> # select a browser tab
187200
```
188201
202+
### Storage
203+
204+
```bash
205+
playwright-cli state-save [filename] # save storage state
206+
playwright-cli state-load <filename> # load storage state
207+
208+
# Cookies
209+
playwright-cli cookie-list [--domain] # list cookies
210+
playwright-cli cookie-get <name> # get a cookie
211+
playwright-cli cookie-set <name> <val> # set a cookie
212+
playwright-cli cookie-delete <name> # delete a cookie
213+
playwright-cli cookie-clear # clear all cookies
214+
215+
# LocalStorage
216+
playwright-cli localstorage-list # list localStorage entries
217+
playwright-cli localstorage-get <key> # get localStorage value
218+
playwright-cli localstorage-set <k> <v> # set localStorage value
219+
playwright-cli localstorage-delete <k> # delete localStorage entry
220+
playwright-cli localstorage-clear # clear all localStorage
221+
222+
# SessionStorage
223+
playwright-cli sessionstorage-list # list sessionStorage entries
224+
playwright-cli sessionstorage-get <k> # get sessionStorage value
225+
playwright-cli sessionstorage-set <k> <v> # set sessionStorage value
226+
playwright-cli sessionstorage-delete <k> # delete sessionStorage entry
227+
playwright-cli sessionstorage-clear # clear all sessionStorage
228+
```
229+
230+
### Network
231+
232+
```bash
233+
playwright-cli route <pattern> [opts] # mock network requests
234+
playwright-cli route-list # list active routes
235+
playwright-cli unroute [pattern] # remove route(s)
236+
```
237+
189238
### DevTools
190239
191240
```bash
192241
playwright-cli console [min-level] # list console messages
193-
playwright-cli run-code <code> # run playwright code snippet
194242
playwright-cli network # list all network requests since loading the page
243+
playwright-cli run-code <code> # run playwright code snippet
195244
playwright-cli tracing-start # start trace recording
196245
playwright-cli tracing-stop # stop trace recording
197246
playwright-cli video-start # start video recording
198-
playwright-cli video-stop # stop video recording
247+
playwright-cli video-stop [filename] # stop video recording
199248
```
200249
201250
### Install
202251
203252
```bash
204-
playwright-cli install # install browser
253+
playwright-cli install-browser # install browser
254+
playwright-cli install-skills # install skills
205255
```
206256
207257
### Configuration
208258
209259
```bash
210-
playwright-cli config # restart session with new config, defaults to `playwright-cli.json`
260+
playwright-cli config [options] # configure session settings
261+
playwright-cli open --browser=chrome # use specific browser
262+
playwright-cli open --extension # connect via browser extension
263+
playwright-cli open --config=file.json # use config file
211264
```
212265
213266
### Sessions
214267
215268
```bash
269+
playwright-cli --session=name <cmd> # run command in named session
216270
playwright-cli session-list # list all sessions
217271
playwright-cli session-stop [name] # stop session
218272
playwright-cli session-restart [name] # restart session
219273
playwright-cli session-stop-all # stop all sessions
220-
playwright-cli session-delete [name] # delete session data
274+
playwright-cli session-delete [name] # delete session data and profiles
275+
```
221276
<!-- END GENERATED CLI HELP -->
222277
223278
## Configuration file
@@ -371,8 +426,7 @@ Playwright CLI will load config from `playwright-cli.json` by default so that yo
371426
372427
</details>
373428
374-
<details>
375-
<summary>Configuration via environment</summary>
429+
## Environment
376430
377431
| Environment |
378432
|-------------|
@@ -418,4 +472,3 @@ Playwright CLI will load config from `playwright-cli.json` by default so that yo
418472
| `PLAYWRIGHT_MCP_USER_AGENT` specify user agent string |
419473
| `PLAYWRIGHT_MCP_USER_DATA_DIR` path to the user data directory. If not specified, a temporary directory will be created. |
420474
| `PLAYWRIGHT_MCP_VIEWPORT_SIZE` specify browser viewport size in pixels, for example "1280x720" |
421-
</details>

‎package-lock.json‎

Lines changed: 87 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"devDependencies": {
3+
"@playwright/cli": "^0.0.63"
4+
}
5+
}

‎scripts/update.js‎

Lines changed: 61 additions & 0 deletions

0 commit comments

Comments
 (0)