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
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,9 @@ playwright-cli video-start # start video recording
playwright-cli video-stop [filename] # stop video recording
```

### Install
### Open parameters

```bash
playwright-cli install --skills # install skills
playwright-cli install-browser # install browser
```

### Configuration

```bash
playwright-cli config [options] # configure session settings
playwright-cli open --browser=chrome # use specific browser
playwright-cli open --extension # connect via browser extension
playwright-cli open --persistent # use persistent profile
Expand All @@ -242,6 +234,23 @@ playwright-cli close # close the browser
playwright-cli delete-data # delete user data for default session
```

### Snapshots

After each command, playwright-cli provides a snapshot of the current browser state.

```bash
> playwright-cli goto https://example.com
### Page
- Page URL: https://example.com/
- Page Title: Example Domain
### Snapshot
[Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml)
```

You can also take a snapshot on demand using `playwright-cli snapshot` command.

If `--filename` is not provided, a new snapshot file is created with a timestamp. Default to automatic file naming, use `--filename=` when artifact is a part of the workflow result.

### Sessions

```bash
Expand All @@ -252,6 +261,15 @@ playwright-cli list # list all sessions
playwright-cli close-all # close all browsers
playwright-cli kill-all # forcefully kill all browser processes
```

### Local installation

In some cases you might want to install playwright-cli locally. If running the globally available `playwright-cli` binary fails, use `npx playwright-cli` to run the commands. For example:

```bash
npx playwright-cli open https://example.com
npx playwright-cli click e1
```
<!-- END GENERATED CLI HELP -->

## Configuration file
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,12 +18,12 @@
"test": "playwright test"
},
"devDependencies": {
"@playwright/test": "1.59.0-alpha-2026-02-14",
"@playwright/test": "1.59.0-alpha-1771104257000",
"@types/node": "^25.2.1"
},
"dependencies": {
"minimist": "^1.2.5",
"playwright": "1.59.0-alpha-2026-02-14"
"playwright": "1.59.0-alpha-1771104257000"
},
"bin": {
"playwright-cli": "playwright-cli.js"
Expand Down
2 changes: 1 addition & 1 deletion scripts/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function main() {
console.log(`Copied skills from ${generatedSkillsDir} to ${targetSkillsDir}`);

// Clean up generated skills directory
await fs.rm(path.join(rootDir, '.claude', 'skills'), { recursive: true });
await fs.rm(generatedSkillsDir, { recursive: true });
console.log('Cleaned up generated skills directory');
} catch {
console.warn('Warning: Generated skills directory not found at', generatedSkillsDir);
Expand Down
39 changes: 29 additions & 10 deletions skills/playwright-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ playwright-cli goto https://playwright.dev
playwright-cli click e15
playwright-cli type "page.click"
playwright-cli press Enter
# take a screenshot
# take a screenshot (rarely used, as snapshot is more common)
playwright-cli screenshot
# close the browser
playwright-cli close
Expand Down Expand Up @@ -155,14 +155,7 @@ playwright-cli video-start
playwright-cli video-stop video.webm
```

### Install

```bash
playwright-cli install --skills
playwright-cli install-browser
```

### Configuration
## Open parameters
```bash
# Use specific browser when creating session
playwright-cli open --browser=chrome
Expand All @@ -186,7 +179,24 @@ playwright-cli close
playwright-cli delete-data
```

### Browser Sessions
## Snapshots

After each command, playwright-cli provides a snapshot of the current browser state.

```bash
> playwright-cli goto https://example.com
### Page
- Page URL: https://example.com/
- Page Title: Example Domain
### Snapshot
[Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml)
```

You can also take a snapshot on demand using `playwright-cli snapshot` command.

If `--filename` is not provided, a new snapshot file is created with a timestamp. Default to automatic file naming, use `--filename=` when artifact is a part of the workflow result.

## Browser Sessions

```bash
# create new browser session named "mysession" with persistent profile
Expand All @@ -204,6 +214,15 @@ playwright-cli close-all
playwright-cli kill-all
```

## Local installation

In some cases user might want to install playwright-cli locally. If running globally available `playwright-cli` binary fails, use `npx playwright-cli` to run the commands. For example:

```bash
npx playwright-cli open https://example.com
npx playwright-cli click e1
```

## Example: Form submission

```bash
Expand Down