Locator Healer Agent

Repair broken UI locators in Playwright or Selenium Page Objects.

129|51|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/anhtester/antigravity-testing-kit --skill locator-healer-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Locator Healer Agent
Source: https://github.com/anhtester/antigravity-testing-kit/tree/main/.agent/skills/locator_healer_agent
Command: npx skills add https://github.com/anhtester/antigravity-testing-kit --skill locator-healer-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When UI changes break automation tests by causing "element not found" or "element detached" errors, this Skill locates the failing selector, analyzes the current DOM, and generates a stable replacement to restore test reliability and reduce manual triage time.

Core Features & Use Cases

  • Failure analysis: Parse test error logs to identify the exact failing locator and the associated Page Object location.
  • DOM inspection & comparison: Inspect the live DOM, compare it with the original selector context, and detect changed attributes or structure.
  • Locator generation & validation: Propose replacement locators in priority order (accessibility attributes, data-testid, id, semantic queries, css, xpath), validate uniqueness and correctness, update the Page Object, and re-run the test to confirm the fix.
  • Use Case: After a frontend deployment that moves elements or renames attributes, run the Locator Healer Agent to automatically repair selectors in Playwright/Selenium Page Objects and recover failing test runs.

Quick Start

Use the Locator Healer Agent to analyze a failing web UI test, identify the broken selector, propose and validate a stable replacement, update the Page Object, and re-run the test to verify success.

Frequently Asked Questions about Locator Healer Agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix broken Playwright locators after UI changes?

Fixing broken Playwright locators requires analyzing failing test logs, inspecting the live DOM, and generating validated replacement selectors to restore test reliability.

What causes element not found errors in test automation?

Element not found errors in test automation occur when DOM mutations, moved elements, or renamed attributes invalidate previously stable locators, causing post-deployment regressions.

How do I automatically repair Selenium or Playwright selectors?

Automatically repair Selenium or Playwright selectors by parsing test logs, inspecting the live DOM, generating validated replacement locators, updating Page Objects, and re-running tests.

What is the best locator strategy for web UI automation?

The best locator strategy for web UI automation prioritizes accessibility attributes, data-testid, id, semantic queries, CSS, and XPath to ensure selector stability and uniqueness.

Do I need live DOM inspection tools to fix failing test selectors?

Yes, fixing failing test selectors requires live DOM inspection tools to compare current page structure with original context, detect changed attributes, and validate replacement uniqueness.

Can I update Page Objects automatically when DOM mutations break tests?

Yes, you can update Page Objects automatically when DOM mutations break tests by identifying failing selectors, applying validated replacement locators, and re-running tests to confirm fixes.