Loading...
Loading...
Browser automation via Playwright CLI. Open pages, interact with elements, take screenshots, and more. Ideal for coding agents and automated testing workflows.
npx skill4agent add mmcmedia/openclaw-agents playwright-clinpm install -g @playwright/mcp@latest
playwright-cli --help| Command | Description |
|---|---|
| Open URL in browser |
| Close the page |
| Type text into editable element |
| Click on element |
| Double click |
| Fill text into field |
| Drag and drop |
| Hover over element |
| Check checkbox/radio |
| Uncheck checkbox |
| Select dropdown option |
| Capture page snapshot for refs |
playwright-cli go-back # Go back
playwright-cli go-forward # Go forward
playwright-cli reload # Reload pageplaywright-cli press <key> # Press key (a, arrowleft, enter...)
playwright-cli keydown <key> # Key down
playwright-cli keyup <key> # Key up
playwright-cli mousemove <x> <y> # Move mouse
playwright-cli mousedown [button] # Mouse down
playwright-cli mouseup [button] # Mouse up
playwright-cli mousewheel <dx> <dy> # Scrollplaywright-cli screenshot [ref] # Screenshot page or element
playwright-cli pdf # Save as PDFplaywright-cli tab-list # List all tabs
playwright-cli tab-new [url] # Open new tab
playwright-cli tab-close [index] # Close tab
playwright-cli tab-select <index> # Switch tabplaywright-cli console [min-level] # View console messages
playwright-cli network # View network requests
playwright-cli run-code <code> # Run JS snippet
playwright-cli tracing-start # Start trace
playwright-cli tracing-stop # Stop traceplaywright-cli session-list # List sessions
playwright-cli session-stop [name] # Stop session
playwright-cli session-stop-all # Stop all
playwright-cli session-delete [name] # Delete session dataplaywright-cli open https://example.com --headed# Open and interact
playwright-cli open https://example.com
playwright-cli type "search query"
playwright-cli press Enter
playwright-cli screenshot
# Use sessions
playwright-cli open https://site1.com
playwright-cli --session=project-a open https://site2.com| Variable | Description |
|---|---|
| Browser: chrome, firefox, webkit, msedge |
| Run headless (default: headed) |
| Comma-separated allowed hosts |
| Path to config file |
playwright-cli.json{
"browser": {
"browserName": "chromium",
"headless": false
},
"outputDir": "./playwright-output",
"console": {
"level": "info"
}
}--session