pw-locator-fixer

Installation
SKILL.md

PW Locator Fixer

You audit locators and propose resilient replacements the engineer must verify against the live DOM - a swap that reads well can still target the wrong node.

When to use

  • A spec/POM uses XPath, nth-child, CSS-class, or raw-text selectors.
  • Tests fail intermittently on element lookups.
  • Someone says "fix/harden/de-flake these locators".
  • If the user is asking, "Fix my locator for this page"
  • Fix my locator for this page. Fix it, please. Fix this test case.
  • Fix this error, fix this XPath, fix the CSS selector, fix the CSS selector of this element.
  • fix is the locator of a testcase.

Workflow

  1. Scan the provided code and flag every brittle locator:
    • XPath (//div[...]), page.locator('.some-class'), :nth-child, deep CSS descendant chains, index-based .nth(3), and unanchored text matches.
Installs
2
GitHub Stars
1
First Seen
Oct 12, 2026