Depends on layout order. One marketing card moves and CI starts sending invoices.
await page.locator('div:nth-child(3) > button').click();
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
Paste AI-written selectors. Get a fragility score, the rot reasons, and drop-in rewrites before your next deploy turns into a Slack incident.
Paste selectors
Fragility Score
85
Brittle
Congratulations, your test suite is held together with vibes and optimism.
Depends on layout order. One marketing card moves and CI starts sending invoices.
await page.locator('div:nth-child(3) > button').click();
Generated class names are implementation exhaust. Your selector is tailing the exhaust.
await page.locator('.css-1a2b3c4').fill('t@desplega.ai');
Binds the test to product copy, localization, and button text experiments.
await page.getByText('Submit').click();
Looks like a test id invented by an AI that never opened the component.
await expect(page.locator('[data-testid="magic-login-button"]')).toBeVisible();
Walks through too many containers. The test knows more about the DOM than the user does.
await page.locator('form div div input').fill('not-a-password');
Selector Rot Scanner
Top 22% this week
Before
85
After
85
Hardened
0
Dominant rot: nth-child trap. Your AI wrote selectors with confidence. You made them survive the next UI pass.
Copy the hardened selector block and drop it into the review thread. The AI can take notes.