UI tests break when one element locator changes, even if the feature works.
Falls back to the next locator strategy and logs exactly which one healed the test.
9 of 9 tests passing, including against a live website.
The problem
UI test automation frequently fails not from feature regression, but from a single fragile element locator shifting beneath an otherwise-unchanged interface — with most frameworks either failing outright or silently masking the degradation through undocumented fallback behavior.
Who it is for
- Organizations maintaining substantial UI test suites experiencing recurring failures from cosmetic, non-functional interface changes
- QA engineering teams requiring visibility into which specific locator strategy resolved element identification, beyond binary pass/fail reporting
Market context
Self-healing locator technology is a mature, established capability across the category — Testim, Mabl, and Applitools each provide AI-assisted selector healing as a component of broader platform offerings.
The gap it closes
Most self-healing implementations are architected to fail silently while preserving a passing test suite status — resolving immediate breakage while concealing progressive degradation of the primary locator until complete failure occurs, without prior warning.
How it works
- A primary locator strategy is attempted first, under standard operating conditions
- Upon failure, the framework proceeds through a defined fallback sequence — identifier, then visible text, then class match, then visual matching via OpenCV
- Every instance of fallback resolution (rather than primary) is explicitly logged, recording the specific successful strategy
What makes it different
- Degradation visibility as a core design principle — fallback reliance is surfaced as an explicit early-warning signal, not concealed behind a passing status
- Verified visual-matching fallback (OpenCV template matching) — validated to correctly report negative results against unrelated imagery rather than producing false positives
Architecture
System Overview
Component Breakdown
| Strategy Interface | Common contract every locator strategy implements |
| 4 Concrete Strategies | ID → visible text → class match → OpenCV visual, tried in order |
| Fallback Logger | Explicitly records every instance a fallback resolved an element |
| OpenCV Visual Matcher | The final-resort strategy, verified against unrelated imagery |
Data Flow
- A test attempts to locate an element using the primary strategy
- On failure, the framework falls through the defined chain
- Each fallback resolution is explicitly logged
- If every strategy fails, a 'not found' is reported, not a false positive
Technology Stack
| Test framework | Playwright | Real browser automation target |
| Design pattern | Strategy pattern | Clean pluggability for new fallback strategies |
| Visual fallback | OpenCV template matching | A last-resort strategy |
| Test runner | pytest | 9 real tests, synthetic HTML and a real live site |
Real Design Trade-off, Documented
Most self-healing locators fail silently to preserve a green suite. This framework logs every fallback use as a visible signal, accepting noisier output in exchange for catching degradation before complete failure.
Performance, Measured Not Estimated
- 9/9 tests passing, validated against synthetic HTML and a real live website
- The OpenCV fallback tested for honesty: fed an unrelated image, correctly reported 'not found'
See Locator Framework working
A guided walkthrough, one-on-one. We usually reply within one business day.