Selector Rot Scanner: How Long Until Your AI-Written Tests Break?

Selector Rot Scanner is a free QA utility for reviewing AI-generated Playwright and Cypress tests before they become tomorrow's flaky build. Paste a test file, a locator block, or the selector soup that just came out of Cursor, Claude Code, Lovable, Replit, or another AI coding tool. The scanner scores each selector for likely rot, explains the failure mode, and suggests a more stable replacement you can copy into a review.

The tool looks for the patterns that usually break first after a UI update: nth-child selectors, XPath, deep descendant chains, generated CSS classes, text strings tied to copy or localization, positional roles, bare tag grabs, and suspicious test ids that look invented rather than owned by the component. Each line receives a danger level and the page rolls those findings into a 0 to 100 Fragility Score. Lower is better. High scores mean your tests are probably checking the DOM's current haircut instead of the product behavior.

The scanner is intentionally deterministic. There is no hidden model call, no upload, and no email gate. The point is fast code-review feedback that a QA engineer or developer can challenge. Accept a rewrite, reject it, or edit the underlying selector in your own test suite. As you harden risky selectors, the score updates in real time and the share card shows the before and after state for a compact artifact you can drop into Slack, X, or LinkedIn.

Use it when AI has produced tests that look plausible but fragile, when Cypress selector best practices are being debated in a pull request, or when Playwright tests keep breaking after harmless UI changes. The goal is not to shame automation. The goal is to turn vague selector anxiety into a concrete, fixable list before CI starts paging the team.

Related reading: Flaky or Fixable triage game · Vibe-Coder Bug Roulette · AI code review roulette · Vibe coding and the QA gap