Atlas › 01 Agent Skills for Browser Automation › Self-Healing Strategies for Agent-Driven Tests☰ Read as one page
Self-Healing Strategies for Agent-Driven Tests
14.1What "Self-Healing" MeansTraditional self-healing (testRigor, mabl, etc.): When a selector breaks, the tool automatically finds an alternative using heuristics…14.2The Three Levels of RecoveryWith ref-driven interaction, the classic "selector broke" failure becomes "ref went stale." The recovery is a fresh snapshot:14.3Recovery Strategy Matrix14.4Implementing Self-Healing in Your FrameworkFor scripted (non-agent) runs, a thin healing wrapper can resolve an element by accessible name from a fresh snapshot:14.5Self-Healing vs Flaky TestsFlaky test: The test itself is unreliable (race conditions, timing issues, external dependencies). Self-healing doesn't fix this — it masks…14.6Tracking Self-Healing EventsLog every healing event for analysis:14.7Locator Robustness HierarchyThe agent interacts via snapshot refs at runtime, but the tests the generator writes (and the patches the healer makes) are .spec.ts files…14.8Interview Talking Point"Our self-healing has three tiers. First, stale refs: the agent re-snapshots — the snapshot is a YAML accessibility summary on disk — and…