Playwright Test Agents
Official Playwright feature (2026) adding three AI agents to the runner: Planner (plans an E2E scenario from natural intent), Generator (generates corresponding Playwright code), Healer (auto-repairs broken selectors after refactor). Combined with Trace Viewer for agents: log of each decision (DOM seen, LLM input/output, chosen action), debuggable like a classic test. Playwright MCP server adds structured browser control for any agent (Claude Code, Cursor) wanting to interact with a live UI.
Strengths
- Healer auto-repairs selectors after refactor, divides E2E maintenance cost by 3-5
- Trace Viewer for agents: LLM decision log debuggable like a classic test
- Playwright MCP server lets Claude Code drive a real browser, basis for custom agentic E2E
- MIT open-source, no per-seat or per-LLM-minute pricing (except model cost)
Limitations
- Anticipate LLM cost: Healer + Generator consume tokens on each big-suite run
- Recent status, best practices not yet stable on Test Agents vs classic tests division
Best for
- Playwright team with ≥50 E2E test suite spending too much time on maintenance after each UI refactor
- Team wanting to drive a browser from Claude Code via the Playwright MCP server