How headout/autoheal works
AutoHeal Locator is a Java library that heals broken Selenium and Playwright element locators. A test calls the public locator API; AutoHeal tries the original selector, checks cached fixes, then uses configured DOM, visual, or hybrid AI-backed strategies and returns a recovered element or locator. Framework adapters bridge to the browser automation APIs, while configuration, reporting, and monitoring support the runtime. The main entry-point excerpt was read in full; several subsystem links below rely on its SOURCE INDEX references or README workflow, not inspection of every implementation.
Main entry points: AutoHealLocator.java AutoHeal API · SelectorCache.java Selector cache · adapter Framework adapters · CostOptimizedHybridElementLocator.java Strategy coordinator
Components 19
Public API
- AutoHeal API
src/main/java/com/autoheal/AutoHealLocator.java
Browser Frameworks
- Framework adapters
src/main/java/com/autoheal/impl/adapter - Selenium adapter
src/main/java/com/autoheal/impl/adapter/SeleniumWebAutomationAdapter.java - Playwright adapter
src/main/java/com/autoheal/impl/adapter/PlaywrightWebAutomationAdapter.java - Browser automation
- Playwright parser
src/main/java/com/autoheal/util/PlaywrightLocatorParser.java
Locator Healing
- Strategy coordinator
src/main/java/com/autoheal/impl/locator/CostOptimizedHybridElementLocator.java - DOM healing
src/main/java/com/autoheal/impl/locator/DOMElementLocator.java - Visual healing
src/main/java/com/autoheal/impl/locator/VisualElementLocator.java - AI service
src/main/java/com/autoheal/impl/ai/ResilientAIService.java - Selector cache
src/main/java/com/autoheal/core/SelectorCache.java - Caffeine cache
src/main/java/com/autoheal/impl/cache/CaffeineBasedSelectorCache.java - Redis cache
src/main/java/com/autoheal/impl/cache/RedisBasedSelectorCache.java - File cache
src/main/java/com/autoheal/impl/cache/PersistentFileSelectorCache.java
Runtime Support
- Configuration
src/main/java/com/autoheal/config - Healing reports
src/main/java/com/autoheal/reporting/AutoHealReporter.java - Metrics monitoring
src/main/java/com/autoheal/monitoring/AutoHealMonitor.java
Other components
- Automation test
- AI providers
Connections 20
- Automation test → AutoHeal API: calls
README.md - AutoHeal API → Framework adapters: uses
src/main/java/com/autoheal/AutoHealLocator.java - AutoHeal API → Strategy coordinator: dispatches
src/main/java/com/autoheal/AutoHealLocator.java - AutoHeal API → Selector cache: checks cache
README.md - AutoHeal API → Configuration: configures
src/main/java/com/autoheal/AutoHealLocator.java - AutoHeal API → Healing reports: reports through
src/main/java/com/autoheal/AutoHealLocator.java - AutoHeal API → Metrics monitoring: monitors through
- Framework adapters → Selenium adapter: includes
README.md - Framework adapters → Playwright adapter: includes
README.md - Selenium adapter → Browser automation: adapts
README.md - Playwright adapter → Browser automation: adapts
README.md - AutoHeal API → Playwright parser: parses locators
src/main/java/com/autoheal/AutoHealLocator.java - Playwright parser → Playwright adapter: produces locator model
src/main/java/com/autoheal/util/PlaywrightLocatorParser.java - Strategy coordinator → DOM healing: tries strategy
src/main/java/com/autoheal/impl/locator/CostOptimizedHybridElementLocator.java - Strategy coordinator → Visual healing: tries strategy
src/main/java/com/autoheal/impl/locator/CostOptimizedHybridElementLocator.java - Visual healing → AI service: requests analysis
src/main/java/com/autoheal/impl/locator/VisualElementLocator.java - AI service → AI providers: calls providers
src/main/java/com/autoheal/impl/ai/ResilientAIService.java - Selector cache → Caffeine cache: implemented by
- Selector cache → Redis cache: implemented by
- Selector cache → File cache: implemented by
src/main/java/com/autoheal/impl/cache/PersistentFileSelectorCache.java