arrow-left Back to topicQuizAgentsCheck yourself1.After a UI redesign, 15 tests are failing because button labels and form field names changed. What's the most efficient way to fix this?Manually open each failing test, find the broken locator, update it by inspecting the new UIUse the healer agent — it replays each failing test in the browser, finds the equivalent elements in the new UI, and patches the locators automaticallyDelete all failing tests and regenerate from the Markdown plans2.What are the three agents in Playwright's AI agent pipeline and what does each one do?recorder, runner, reporter — they record, execute, and report test resultsplanner (explores the app and writes a Markdown test plan), generator (turns the plan into Playwright test code), healer (fixes failing tests automatically)analyzer, writer, debugger — they analyze coverage gaps, write tests, and debug failuresseeder, executor, validator — they seed test data, run tests, and validate outcomes3.What command do you run to generate agent definition files for Claude Code?npx playwright codegen --ai=claudenpx playwright init-agents --loop=claudenpx playwright agents install --tool=claudenpx playwright setup-mcp --provider=claude4.What is the purpose of the seed test (seed.spec.ts) used by the planner and generator agents?It seeds the database with test data before each agent runIt provides the agent with a ready starting page — handling authentication and navigation so the agent can begin exploring from a known stateIt is the template that the generator copies when creating new test filesIt runs before every generated test to verify the environment is healthy5.What does the generator agent do that makes its output more reliable than naive AI code generation?It uses a formal specification language to describe tests before converting to codeIt opens the real app and verifies each locator and assertion live as it writes the test — the generated tests are already confirmed against the actual UIIt generates tests in multiple languages and picks the one that passes all checksIt copies patterns from a pre-trained dataset of high-quality Playwright tests6.What happens when healer determines that a failing test reflects a real bug in the application rather than a broken locator?Healer deletes the failing test to keep the test suite greenHealer skips the test and reports the issue — it doesn't fix application bugs, only broken test locators and wait strategiesHealer automatically creates a GitHub issue with the detailsHealer patches the test to skip the failing assertion so the test passes7.Where does Playwright store the agent definition files when you run npx playwright init-agents --loop=claude?In node_modules/@playwright/agents/In .github/ — the standard location for Claude Code agent definitionsIn playwright.config.ts as exported agent configurationIn specs/agents/ alongside the Markdown test plans8.The agent-produced test file has clear, semantic locators and readable structure, but a human engineer notices a more efficient assertion strategy. Should they edit the file?No — agent-generated files must never be manually edited or the agents will refuse to process themYes — agent-generated tests are regular Playwright files that humans can and should improve; the value is in the workflow, not in treating output as immutableOnly the healer agent is allowed to modify generated test filesManual edits are fine but must be tagged with a // human-edit comment so the agent ignores those linesSubmit answersarrow-left PreviousLibraryComponents (experimental)Next arrow-right