@@ -32,7 +32,7 @@ playwright-cli --help
3232Claude Code, GitHub Copilot and others will use the locally installed skills.
3333
3434``` bash
35- playwright-cli install-skills
35+ playwright-cli install - -skills
3636```
3737
3838### Skills-less operation
@@ -105,13 +105,13 @@ Playwright CLI will use a dedicated persistent profile by default. It means that
105105your cookies and other storage state will be preserved between the calls. You can use different
106106instances of the browser for different projects with sessions.
107107
108- Following will result in two browsers with separate profiles being available. Pass ` --session ` to
108+ Following will result in two browsers with separate profiles being available. Pass ` -s= ` to
109109the invocation to talk to a specific browser.
110110
111111``` bash
112112playwright-cli open https://playwright.dev
113- playwright-cli --session =example open https://example.com
114- playwright-cli session- list
113+ playwright-cli -s =example open https://example.com
114+ playwright-cli list
115115```
116116
117117You can run your coding agent with the ` PLAYWRIGHT_CLI_SESSION ` environment variable:
@@ -120,16 +120,14 @@ You can run your coding agent with the `PLAYWRIGHT_CLI_SESSION` environment vari
120120PLAYWRIGHT_CLI_SESSION=todo-app claude .
121121```
122122
123- Or instruct it to prepend ` --session ` to the calls.
123+ Or instruct it to prepend ` -s= ` to the calls.
124124
125125Manage your sessions as follows:
126126
127127``` bash
128- playwright-cli session-list # list all sessions
129- playwright-cli session-stop [name] # stop session
130- playwright-cli session-restart [name] # restart session
131- playwright-cli session-stop-all # stop all sessions
132- playwright-cli session-delete [name] # delete session data along with the profiles
128+ playwright-cli list # list all sessions
129+ playwright-cli close-all # close all browsers
130+ playwright-cli kill-all # forcefully kill all browser processes
133131```
134132
135133<!-- BEGIN GENERATED CLI HELP -->
@@ -152,6 +150,7 @@ playwright-cli upload <file> # upload one or multiple files
152150playwright-cli check < ref> # check a checkbox or radio button
153151playwright-cli uncheck < ref> # uncheck a checkbox or radio button
154152playwright-cli snapshot # capture page snapshot to obtain element ref
153+ playwright-cli snapshot --filename=f # save snapshot to specific file
155154playwright-cli eval < func> [ref] # evaluate javascript expression on page or element
156155playwright-cli dialog-accept [prompt] # accept a dialog
157156playwright-cli dialog-dismiss # dismiss a dialog
@@ -187,7 +186,9 @@ playwright-cli mousewheel <dx> <dy> # scroll mouse wheel
187186
188187` ` ` bash
189188playwright-cli screenshot [ref] # screenshot of the current page or element
189+ playwright-cli screenshot --filename=f # save screenshot with specific filename
190190playwright-cli pdf # save page as pdf
191+ playwright-cli pdf --filename=page.pdf # save pdf with specific filename
191192` ` `
192193
193194# ## Tabs
@@ -250,8 +251,8 @@ playwright-cli video-stop [filename] # stop video recording
250251# ## Install
251252
252253` ` ` bash
254+ playwright-cli install --skills # install skills
253255playwright-cli install-browser # install browser
254- playwright-cli install-skills # install skills
255256` ` `
256257
257258# ## Configuration
@@ -260,18 +261,22 @@ playwright-cli install-skills # install skills
260261playwright-cli config [options] # configure session settings
261262playwright-cli open --browser=chrome # use specific browser
262263playwright-cli open --extension # connect via browser extension
264+ playwright-cli open --persistent # use persistent profile
265+ playwright-cli open --profile=< path> # use custom profile directory
263266playwright-cli open --config=file.json # use config file
267+ playwright-cli close # close the browser
268+ playwright-cli delete-data # delete user data for default session
264269` ` `
265270
266271# ## Sessions
267272
268273` ` ` bash
269- playwright-cli --session =name < cmd> # run command in named session
270- playwright-cli session-list # list all sessions
271- playwright-cli session-stop [ name] # stop session
272- playwright-cli session-restart [name] # restart session
273- playwright-cli session-stop- all # stop all sessions
274- playwright-cli session-delete [name] # delete session data and profiles
274+ playwright-cli -s =name < cmd> # run command in named session
275+ playwright-cli -s=name close # stop a named browser
276+ playwright-cli -s= name delete-data # delete user data for named browser
277+ playwright-cli list # list all sessions
278+ playwright-cli close- all # close all browsers
279+ playwright-cli kill-all # forcefully kill all browser processes
275280` ` `
276281< ! -- END GENERATED CLI HELP -->
277282
@@ -426,7 +431,8 @@ Playwright CLI will load config from `playwright-cli.json` by default so that yo
426431
427432</details>
428433
429- ## Environment
434+ <details>
435+ <summary>Configuration via env</summary>
430436
431437| Environment |
432438|-------------|
@@ -472,3 +478,4 @@ Playwright CLI will load config from `playwright-cli.json` by default so that yo
472478| ` PLAYWRIGHT_MCP_USER_AGENT` specify user agent string |
473479| ` PLAYWRIGHT_MCP_USER_DATA_DIR` path to the user data directory. If not specified, a temporary directory will be created. |
474480| ` PLAYWRIGHT_MCP_VIEWPORT_SIZE` specify browser viewport size in pixels, for example " 1280x720" |
481+ </details>
0 commit comments