Playwright Best Practices CLI Context: Prevent Context Overflow When running Playwright tests from Claude Code or any CLI agent, always use minimal reporters to prevent verbose output from consuming the context window. Use or for CLI test runs: Configure to use minimal reporters by default when or env vars are set: Locator Priority (Most to Least Resilient) Always prefer user-facing attributes: 1. - accessibility roles 2. - form control labels 3. - input placeholders 4. - visible text (non-interactive) 5. - image alt text 6. - title attributes 7. - explicit test contracts 8. CSS/XPath - last…