Using Playwright Agents to Help your team Ship Tests Faster
Nadav Lebovitch
[email protected]
Why Agents for QA/AI
Bridge QA automation with
developer velocity
Plan → Generate → Heal
Bridge QA automation with developer velocity through an intelligent workflow
Cut Manual Work
Cut manual selector hunting and reduce flakiness
Auditable Artifacts
Create auditable artifacts developers trust: specs, tests, patches
Planner
•
Generator
• Healer
Planner
Explores app, outputs precise Markdown scenarios + assertions
Generator
Converts spec to Playwright tests, validates selectors live
Healer
Replays failures, proposes patches, re-runs to green or guards
Getting Started in
Our Codebase
01
Init agents
npx playwright init-agents –loop=claude
(or vscode)
02
Seed test bootstraps
Fixtures/auth/data for agent context
03
Conventions
specs/ → tests/ with .github agent definitions
Demo: From Request to
Passing Tests
1. Prompt
"Generate plan for guest checkout" → specs/basic-operations.md
2. Run generator
Creates tests/** and verifies selectors
3. Execute + heal
Execute + heal failure → review locator/wait/data patch, re-run
Collaboration & Guardrails
Keep specs crisp; align testability hooks and data with devs
Review healer patches; merge via standard PR workflow
Regenerate agent definitions after Playwright upgrades; track flake rate