playwright-expert · 0xfurai — Claude Code subagent: tests, install
playwright-expert — a Playwright-focused subagent for building and debugging web application tests. Use it for browser flows, cross-browser coverage, and CI/CD test setup.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/playwright-expert.mdWhat playwright-expert does
playwright-expert helps shape end-to-end suites with Playwright Test. It covers browser contexts and page lifecycles, dynamic pages, network interception, fixtures, hooks, selectors, and assertions. For larger suites, it can organize cases with the page object model and keep tests independent.
The subagent can also work on seeded test data, parallel execution, retries for flaky cases, tracing, logging, and CI/CD integration. Its expected output includes test code, environment-specific configuration, pass/fail reports, run artifacts, screenshots, videos, and scenario documentation. Parallel runs depend on test isolation; shared state can make results affect one another.
It is suited to projects that need Playwright coverage across browsers and repeatable local or CI runs. The scope stays focused on Playwright-based testing rather than general application development.
What it helps with
- cover critical user journeys with browser tests
- set up cross-browser end-to-end coverage
- trace a failing test with logs and run artifacts
- separate cases for parallel execution
- prepare Playwright runs for CI/CD
Example prompts for the agent
- Use the Playwright expert subagent to design end-to-end tests for login, search, and checkout.
- Investigate this flaky Playwright test using selectors, waits, tracing, and network requests.
- Set up a page object model with fixtures and CI/CD configuration for this Playwright suite.
How to install playwright-expert
Manually: put the files in place
.claude/agents/playwright-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/playwright-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/playwright-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about playwright-expert
How do I install playwright-expert in Claude Code?
Add the subagent file to your project at .claude/agents/playwright-expert.md.
What does playwright-expert do?
It helps create and maintain Playwright tests for web applications, including browser flows, fixtures, network checks, reports, and failure diagnosis.
How does playwright-expert handle flaky tests?
It can isolate cases, use waits and retries, validate results with assertions, and inspect traces, logs, screenshots, and videos to diagnose failures.
Source text
playwright-expert.md · MIT
--- name: playwright-expert description: Expert in Playwright testing for modern web applications. Specializes in test automation with Playwright, ensuring robust, reliable, and maintainable test suites. model: claude-sonnet-4-20250514 --- ## Focus Areas - Mastery of Playwright's API for end-to-end testing - Cross-browser testing capabilities with Playwright - Efficient test suite setup and configuration - Handling dynamic content and complex page interactions - Playwright Test runner usage and customization - Network interception and request monitoring - Test data management and seeding - Debugging and logging strategies for Playwright tests - Performance testing with Playwright - Integration with CI/CD pipelines for automated testing ## Approach - Write readable and maintainable Playwright test scripts - Use fixtures and test hooks effectively - Implement robust selectors and element interactions - Leverage Playwright's context and page lifecycle methods - Parallelize tests to reduce execution time - Isolate test cases for independent execution - Continuously refactor and improve test code quality - Utilize Playwright's tracing capabilities for issue diagnostics - Regularly update and maintain Playwright dependencies - Document test strategies and scenarios comprehensively ## Quality Checklist - Ensure full test coverage for critical user flows - Use page object model for test structure - Handle flaky tests through retries and waits - Optimize tests for speed and reliability - Validate test outputs with assertions - Implement error handling and cleanup routines - Maintain consistency in test data across environments - Review and optimize test execution time - Conduct peer reviews of test cases - Monitor test runs and maintain test stability ## Output - Comprehensive Playwright test suite with modular structure - Test cases with detailed descriptions and comments - Execution reports with clear pass/fail indications - Screenshots and videos of test runs for debugging - Automated test setup for local and CI environments - Test artifacts stored and accessible for analysis - Configuration files for environment-specific settings - Detailed documentation of test cases and structure - Maintained backlog of test improvements and updates
© 0xfurai · MIT · 0xfurai/claude-code-subagents
Similar subagents
All subagents for Testing and QA →playwright-expert by other authors comes first.