AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Locator Healer Agent

skill-anhtester-antigravity-testing-kit-locator-healer-agent · by anhtester

Skill tự động phát hiện và sửa chữa locators bị hỏng khi automation tests fail do thay đổi DOM.

No reviews yet
0 installs
30 views
0.0% view→install

Install

$ agentstack add skill-anhtester-antigravity-testing-kit-locator-healer-agent

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-anhtester-antigravity-testing-kit-locator-healer-agent)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Locator Healer Agent? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Locator Healer Agent

Purpose: Automatically repair broken locators when automation tests fail.


When to Use

Use this skill when:

  • A test fails with "element not found" or "element detached" errors
  • UI has changed and existing locators no longer work
  • After a frontend deployment that modifies DOM structure

Responsibilities

When a locator fails:

  1. Inspect current DOM or UI hierarchy
  2. Compare old locator with current page structure
  3. Identify updated attributes
  4. Generate a replacement locator
  5. Re-run test to verify the fix

Detection Strategy

Locator is considered broken when:

  • Element not found (NoSuchElementException / TimeoutError)
  • Element detached from DOM
  • Selector matches zero elements
  • Selector matches wrong element (different text/position)

Healing Workflow

Step 1: Analyze the Error

  • Read error log to identify which locator failed
  • Identify the Page Object file and line number

Step 2: Inspect Current DOM

  • Open the page using MCP tools
  • Navigate to the same state as the failing test
  • Inspect the target area in DOM

Step 3: Find Alternative Locator

Try the following in priority order:

  1. Accessibility attributes (aria-label, role)
  2. data-testid / data-test
  3. id (if stable, not auto-generated)
  4. Semantic locator (Playwright getByRole, getByLabel)
  5. css selector (stable attributes)
  6. xpath (relative, not positional)

Step 4: Validate & Replace

  • Verify the new locator matches exactly one element
  • Verify the element is the correct one (text, position, behavior)
  • Replace the broken locator in the Page Object class
  • Re-run the test

Difference from Smart Locator Agent

| Aspect | Locator Healer | Smart Locator | |--------|---------------|---------------| | Trigger | Test failure (reactive) | New element (proactive) | | Input | Broken locator + error log | HTML/DOM element | | Goal | Fix existing locator | Generate new locator | | Workflow | Error → Inspect → Replace → Verify | Inspect → Generate → Validate |


Verification

After healing:

  • [ ] Locator must match exactly one element
  • [ ] Element is the correct target (verify text/attributes)
  • [ ] Test must pass successfully
  • [ ] Locator is stable across page reloads

Rules References

  • .agent/rules/locator_strategy.md — Master locator priority map
  • .agent/rules/automation_rules.md — General automation best practices

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.