It's Monday morning and half the overnight run is red. Nothing is actually broken. A developer renamed a button from "Sign Up" to "Create account" and moved it into a new header component, and every test that clicked it now fails.
Self-healing test automation exists for exactly this. It's also widely oversold. This guide explains how it works, what it can and can't fix, how to review what it changes, and how to compare the tools that offer it.
Self-healing test automation is a technique where the test tool finds the intended element again after the UI changes, instead of failing on a broken locator. It compares several attributes, visual and semantic cues or the step's intent, updates the step and records the change. It fixes locator breakage, not real bugs, changed requirements or bad test data.
Key takeaways
- Self-healing repairs tests broken by UI changes, such as renamed IDs, moved buttons and new component libraries, when the user's goal hasn't changed.
- It doesn't fix real bugs, changed workflows, test data problems or most timing issues. Those need a person or a different fix.
- Every heal should be logged and reviewable. A heal that clicks the wrong button is worse than a failure.
- Evaluate tools by breaking things on purpose: change an ID, move a button, rename a label, then read the healing log.
What is self-healing test automation?
Traditional UI tests find elements with one locator: an ID, a CSS selector or an XPath. When that locator stops matching, the test fails, even if the button still works perfectly.
Self-healing adds a recovery step. When the primary locator fails, the tool uses other information about the element to find the one the step meant. With a confident match, it carries on and records the change. Without one, it fails clearly or asks a person.
The idea is simple: a test should break when the product breaks, not when its HTML is rearranged.
How does self-healing test automation work?
Most tools follow the same loop, whatever they call it:
- Detect. The step's primary locator finds no element, or the wrong number of elements.
- Gather candidates. The tool collects elements that could be the target.
- Score. Each candidate is compared with what the tool knows about the original element.
- Act or escalate. A strong match is used and the run continues. A weak or ambiguous match fails the step or goes to a person.
- Record. The heal is logged: old locator, new match, why it was chosen.
The differences between tools are in steps 2 and 3. There are four common approaches, and many products combine them.
| Approach | How it finds the element | Good at | Weak at |
|---|---|---|---|
| Fallback locators | Tries alternative locators saved for the element (XPath, CSS, attributes) in a set order | Simple ID and class changes | Changes that break every saved locator at once |
| Multi-attribute matching | Compares many properties together: text, role, type, position, parent and neighbours | Refactors and component library swaps | Pages with many near-identical elements |
| Visual and semantic matching | Uses screenshots, labels and accessibility information to find what looks and reads the same | Redesigns where structure changes but meaning doesn't | Visually similar buttons with different jobs |
| AI intent | Uses the step's description ("click the checkout button") to find the element that does that job now | Renamed labels and moved elements | Steps whose description is vague |
What do vendors document about their approach?
Katalon is a clear example of the first two layers. When a locator fails, Katalon Studio tries other known locators in the priority order you set, with XPath, attributes, CSS, image and Smart Locator as options. If that fails, AI self-healing analyses the page source, accessibility tree and screenshots to suggest a new locator.
testRigor shows the intent approach. It records how an end user would describe an element and uses that description to find it again when a locator breaks. With Vision AI and auto-healing turned on, it looks for another way to do what the step intended.
Self-healing vs flaky tests: what's the difference?
A flaky test passes and fails on the same code. Self-healing is one fix for one cause of failures. The two are related but not the same thing.
Flakiness is common even at large engineering organisations. Google reported that about 1.5% of all its test runs reported a flaky result, almost 16% of its tests had some level of flakiness, and about 84% of pass-to-fail transitions involved a flaky test.
Here's how the usual causes of UI test failures map to self-healing:
| Cause | Example | Does self-healing help? |
|---|---|---|
| Brittle locators | Auto-generated class .btn-x7k2 changes on every build | Yes, this is what it's built for |
| UI refactors | Button moves into a new header component | Yes, if the button still does the same job |
| Timing and synchronisation | Fixed sleep(3000) while a page sometimes takes 4 seconds | Mostly no. Use proper waits |
| Test data | The test user's cart already has items from a previous run | No. Reset or isolate data |
| Environment | A third-party sandbox is down | No. Mock it or mark the dependency |
| Test interdependence | Test B relies on state left by Test A | No. Make tests independent |
Retrying isn't healing. A retry runs the same step with the same locator and hopes the problem was temporary. That can hide timing issues, but it can't fix a locator that's permanently wrong. Self-healing changes which element the step uses. Good suites use both, for different problems.
For a deeper look at measuring and paying down flakiness, read how self-healing tests cut flaky test debt.
What can't self-healing fix?
A useful rule: if the user's goal hasn't changed, self-healing can usually adapt. If the application's behaviour has changed, the test itself should change.
| Change | Should the test heal? | Why |
|---|---|---|
| CSS classes or IDs renamed | Yes | Same element, same job |
| Button moved on the page | Yes | Context and purpose unchanged |
| Component library migration | Yes, mostly | Structure changes, workflow doesn't |
| "Sign Up" renamed to "Create account" | Usually, with review | Same intent, new label |
| Checkout redesigned from three steps to one | No | The user journey changed |
| Business rule changed (new discount logic) | No | Expected results must change |
| A real bug (button no longer submits) | No | The test should fail |
| Bad or shared test data | No | Not a UI problem |
| Slow pages and race conditions | No | Needs waits or performance work |
| Security or performance problems | No | Needs dedicated testing |
The most dangerous failure mode is a heal that hides a bug. If a "Submit" button disappears and the tool heals to "Save draft", the test may pass while the feature is broken. That's why logging and review matter as much as the healing itself.
How should you review healed steps?
Treat a heal like a code change somebody else made to your test. Most will be fine. A few won't, and you want to catch those before they become passing tests that test the wrong thing.
A useful healing log shows, for every heal:
- the test and step that healed;
- what the original locator or description was;
- what element was used instead, ideally with a screenshot;
- why the tool chose it (matching attributes, confidence, or the AI's reasoning);
- a way to accept the change, reject it or roll it back.
Vendors handle this differently. Katalon lists suggested replacements in a Self-healing Insights tab where you approve or discard each one. testRigor labels healed test cases "fixed-by-ai", shows a warning on healed steps and lets you roll back. Robonito logs healed steps for review alongside the run's video and network traces.
Build a review habit
- Review heals every sprint, not only when something looks wrong.
- Prioritise critical paths. A heal on the login or payment step deserves a closer look than one on a footer link.
- Watch for clusters. Many heals in one area usually mean a redesign. Update those tests deliberately instead of accepting heal after heal.
- Use heals as a UI drift signal. A spike in heals tells you the frontend changed a lot, which is worth knowing before release.
How does self-healing reduce test maintenance?
Most UI test maintenance is repetitive: find the failing test, work out which locator broke, find the new one, update the test and any shared page objects, re-run. Self-healing removes the middle of that loop for routine UI changes.
To estimate what it's worth for your team, count it rather than trusting a vendor percentage. Over a few sprints, record how many test failures were locator or UI-change failures, and how long each took to fix. That number, multiplied by your release frequency, is the work self-healing can target. Failures from data, timing and real bugs stay.
For the cost side of the argument, see what test maintenance really costs and how self-healing helps.
Which test automation tools offer self-healing?
Self-healing is now standard in commercial AI testing tools, and available as an add-on for open-source frameworks. The table summarises what each vendor's own pages describe, as of November 2026.
| Tool | How it describes healing | Review of heals |
|---|---|---|
| Robonito | Steps adapt when labels, layouts or locators change | Healed steps logged for review |
| Katalon Studio | Fallback through prioritised locators, then AI analysis of page source, accessibility tree and screenshots | Approve or discard suggestions in Self-healing Insights |
| testRigor | Finds elements by end-user description; Vision AI looks for another way to do the intended step | Healed tests labelled "fixed-by-ai", with rollback |
| mabl | "Adaptive Multi-Layer Auto-Healing" using several AI models, visual context and multiple attributes | The agent asks for input when unsure; no review queue described on that page |
| Testim | AI and ML smart locators that self-heal | See vendor docs |
| Testsigma | Self-healing updates locators when the UI changes; AI proposes the fix | A human approves before anything ships |
| BrowserStack Low Code Automation | "Adaptive Healing AI" fixes tests broken by UI or workflow changes | See vendor docs |
| Playwright Test Agents | The healer agent replays failing steps, finds equivalent elements and proposes a patch | Patches are code changes you review; it skips tests where it thinks the feature is broken |
| Healenium | Open-source (Apache-2.0) library that wraps a Selenium driver; a score-cap setting sets the match threshold | Works with a backend service and IDE plugin to update locators |
Teams writing Selenium or Playwright code can add healing with Healenium or Playwright's healer. Teams whose testers don't code will find a platform with built-in, reviewable healing easier to live with.
How do you evaluate a self-healing tool?
Run the same four changes against every tool you shortlist, on your own app:
- Change an element ID on a key button.
- Move a button into a different container or part of the page.
- Rename a label, for example "Sign Up" to "Create account".
- Add a step to a flow, such as a new consent screen.
The first three should heal and show up in the log. The fourth should fail clearly, because the journey changed. A tool that "heals" the fourth case without telling you is a risk.
Then work through this checklist:
- Does it match on several attributes or signals, not just one fallback selector?
- Does every heal appear in a log with before-and-after detail?
- What happens when it isn't sure: fail, flag or guess?
- Can you accept, reject or roll back a heal?
- Can a tester who doesn't code create, fix and review tests?
- Do heals show up in CI results, so a green build with heals is visible?
How do you roll out self-healing without making a mess?
- Start with your most fragile tests. The ones that fail most often, usually on dashboards, forms, navigation and checkout, show the value fastest and test the tool hardest.
- Fix bad tests first. Self-healing won't repair a race condition, a wrong assertion or a test that depends on another test.
- Run old and new suites in parallel for a couple of sprints. Differences between them reveal wrong heals and missed flows before you lose your safety net.
- Spread ownership. If one engineer still maintains everything, the bottleneck hasn't moved.
Where does Robonito fit, and where doesn't it?
Robonito is an agentic QA platform: AI agents create, run and maintain end-to-end tests. Self-healing is on every plan, including Free. Steps adapt when labels, layouts or locators change, and healed steps are logged for review.
Tests are built without code: describe what to test in AI Studio, record a flow in the desktop app, or assemble reusable no-code steps, with low-code extensions for advanced cases. Because tests are readable steps rather than scripts, a tester can open a test after a heal, check what changed and edit it.

Every run keeps video, network traces and an AI root cause for failures, so when a heal looks wrong you can see what happened. Runs plug into Jenkins, GitHub Actions, GitLab CI and Azure DevOps on Starter and above.
Where it doesn't fit as well:
- If your suite is Selenium or Playwright code you want to keep, Healenium or Playwright's healer adds healing without a migration. Robonito means recreating tests as steps.
- Free and Starter are web-only. Mobile, desktop and API testing need Pro or Enterprise.
- Self-healing won't fix your test data or timing problems in Robonito or anywhere else.
Club Car used Robonito to cut QA testing time by over 70% on its CPQ and 3D configurator testing. See how it handles end-to-end testing, on one of your most fragile journeys, or .
Frequently asked questions
What is self-healing test automation?
Self-healing test automation is a technique where the test tool finds the intended element again after a UI change, instead of failing on a broken locator. It compares other attributes, visual or semantic cues, or the step's intent, continues the run with the best match, and logs the change so a person can review it.
Does self-healing eliminate flaky tests?
No. It removes failures caused by locators and UI changes, which are a large share of brittle UI tests. Flakiness from timing, shared test data, unstable environments and tests that depend on each other needs other fixes, such as proper waits, isolated data and mocked dependencies. Treat self-healing as one tool in a flakiness plan.
Can self-healing hide real bugs?
It can, if heals aren't reviewed. If a button disappears and the tool heals to a similar-looking one, a broken feature can pass. Good tools log every heal, fail or ask when they aren't confident, and let you reject a heal. Review heals on critical paths every sprint.
How is self-healing different from retrying failed tests?
A retry repeats the same step with the same locator, which only helps if the failure was temporary. Self-healing changes which element the step uses after the original locator stops working. Retries address some timing flakiness; self-healing addresses locator breakage. They solve different problems and work well together.
Does Selenium or Playwright have self-healing?
Not built into the core frameworks. For Selenium, the open-source Healenium library wraps the driver and heals locators. Playwright ships Test Agents, including a healer that replays failing tests and proposes code fixes. Playwright's role-based locators also make tests less brittle in the first place.
How do I know if a self-healing tool is any good?
Test it on your app. Change an element ID, move a button and rename a label: those should heal and appear in the log. Then add a new step to a flow: that should fail clearly. Check that you can see, accept and roll back every heal.
Stop fixing locators by hand. or .




