Browser Testing with playwright-cli
Test websites and frontend tools using playwright-cli.
First Step
Run the help command to discover all available commands:
playwright-cli --help
Determining the Target URL
Use the URL appropriate for the current context:
- Local dev server: Check the project for its dev server port (commonly
http://127.0.0.1:8000or similar) - Remote site: Use the URL provided by the user or documented in the project
Key Context
- Console errors and snapshots are written to
.playwright-cli/in the project root — read these files to check results - Element refs (e.g.
e9,e18) come from snapshots and change between page loads - Always close the browser when done with
playwright-cli close