playwright-cli

Record, generate, and inspect Playwright test code from browser interactions.

brewmacoslinux
Try with needOr install directly
Source

About

CLI for Playwright: record/generate code, inspect selectors, take screenshots

Commands

playwright

Examples

record browser actions and generate test code$ playwright codegen https://example.com
take a screenshot of a webpage$ playwright screenshot https://example.com screenshot.png
inspect and find CSS selectors on a page$ playwright inspect https://example.com
generate test code for a specific browser$ playwright codegen --browser=firefox https://example.com
run a Playwright test script$ playwright test script.js