Playwright Generate Test

Use when: generate a Playwright test from a user scenario by first exploring the UI and then saving a passing test.

kimtth 4a96c24 662 B Updated

File contents

Goal: generate a Playwright test from observed UI behavior.

Workflow:

  1. Ask for a scenario if missing.
  2. Open or run the app and walk the flow with browser or Playwright tools.
  3. Capture stable role, label, or text locators.
  4. Save a TypeScript test under the project's tests folder.
  5. Run it and iterate until pass or report the blocker.

Rules:

  • assert user-visible outcomes, not implementation details
  • avoid arbitrary sleeps and brittle CSS
  • report file path, command, and result

kimtth/agent-skill-100-lines-or-less/tree/main/skills/playwright-generate-test commit 4a96c24a15

Frequently asked questions

npx skillmds@latest add kimtth/playwright-generate-test