# Playwright Testing

> ALWAYS use this when testing a website with a web client. This skill should be used when testing frontend tools, verifying UI behavior, checking page loads, validating URL routing, or interacting with the browser in any way.

- Skill: `amitkot/playwright-testing` (Agent Skill)
- Install (CLI): `npx skillmds@latest add amitkot/playwright-testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/amitkot/playwright-testing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: amitkot (https://skillmd.com/u/amitkot)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/amitkot/playwright-testing

---


# Browser Testing with playwright-cli

Test websites and frontend tools using `playwright-cli`.

## First Step

Run the help command to discover all available commands:

```bash
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:8000` or 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`

