AutoHeal detects broken element locators at runtime, repairs them with 90–95% accuracy, and keeps your Android and iOS automation green — without rewriting a single test.
driver.findElement(
By.id("input_password")
);
// 💥 NoSuchElementException
// locator id="input_password"
// not found on page
Map<String,String> p = new HashMap<>();
p.put("locator", "input_password");
String healed = (String) driver
.executeScript("mobile:heal:locator", p);
// ✅ id="input_password"
// → id="txt_password_field"
A developer renames a resource ID. A class name shifts after a refactor. An iOS accessibility label changes for a localisation pass. Your overnight regression goes red — and a QA engineer spends the morning hunting for one-line fixes.
AutoHeal sits inside your Appium driver and watches every locator. When an attribute drifts, it scans the live page hierarchy, finds the most likely match using the element's stored fingerprint, and returns the new locator at runtime — keeping your test green.
You enable it with a single capability. No rewrites, no DSL, no custom framework.
ID, name, class, text, accessibility ID — when only the value drifts.
XPath / CSS selectors that break because of small DOM-tree shifts.
Same self healing engine for Android (UIAutomator2) and iOS (XCUITest) — tested on real hardware, not simulators.
AutoHeal runs inside your existing Appium driver. Your test code barely changes.
Add autoheal: true to your Appium DesiredCapabilities. No SDK install.
On the first successful run, AutoHeal stores a fingerprint of every element your test touches.
On later runs, if a locator no longer resolves, AutoHeal scans the live page for the closest match.
The new locator is returned via mobile:heal:locator so your test step continues — no failure, no flake.
Three surfaces matter — the capability, the heal endpoint, and the dashboard that tells you what was repaired.
DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability( "autoheal", true );
No new dependency, no rebuild — just an extra capability on your Appium driver.
Map<String,String> p = new HashMap<>();
p.put("locator", "input_password");
String healed = (String) driver
.executeScript(
"mobile:heal:locator", p
);
Wrap your locator lookup once. AutoHeal returns the original — or the repaired one.
Per-run heal log so engineers can review and promote repairs back into source.
Three lines: enable the capability, wrap your locator lookup, use it. That's the entire integration.
// 1. Enable the capability
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("autoheal", true);
// 2. Wrap your locator lookup
public String getHealedLocator(String original) {
Map<String,String> p = new HashMap<>();
p.put("locator", original);
return (String) driver.executeScript(
"mobile:heal:locator", p
);
}
// 3. Use it in your test
String loc = getHealedLocator("input_password");
driver.findElement(AppiumBy.id(loc)).sendKeys("•••");
# 1. Enable the capability
caps = {"autoheal": True, "platformName": "Android", ...}
driver = webdriver.Remote(APPIUM_URL, caps)
# 2. Wrap your locator lookup
def healed(original: str) -> str:
return driver.execute_script(
"mobile:heal:locator", {"locator": original}
)
# 3. Use it in your test
loc = healed("input_password")
driver.find_element(AppiumBy.ID, loc).send_keys("•••")
// 1. Enable the capability
const caps = { autoheal: true, platformName: 'iOS', /* … */ };
const driver = await wdio.remote({ capabilities: caps });
// 2. Wrap your locator lookup
const healed = (locator) =>
driver.execute('mobile:heal:locator', { locator });
// 3. Use it in your test
const loc = await healed('input_password');
await (await driver.$(`#${loc}`)).setValue('•••');
AutoHeal supports every common Appium locator strategy on both platforms — no special selector syntax.
AutoHeal is a runtime safety net for locator drift — not a replacement for fixing genuinely broken UI flows.
On supported attribute and property changes for indexed elements — measured across thousands of real-device runs on Android and iOS.
Healing happens inside the test run — no offline rewrites, no PR cycle, no overnight failures.
See exactly which locators were healed and to what — auditable before/after for every repair.
ID, XPath, CSS, accessibility ID, class, name, text, tag.
Appium · TestNG · JUnit · PyTest · WebdriverIO.
Toggle per job — only enable healing where it helps.
Each run refreshes element fingerprints.
A self healing agent is an AI component that sits inside your test execution layer and automatically repairs broken element locators at runtime. Instead of failing a test when an ID, XPath or accessibility label changes, it scans the live page, finds the most likely match using a stored fingerprint of the element, and returns the new locator so the test step continues — no engineer triage required.
AutoHeal stores a fingerprint of every element your test touches on the first successful run. On later runs, if a locator no longer resolves, it inspects the live UIAutomator2 or XCUITest page hierarchy, scores candidate elements against the stored fingerprint, and returns the best match through the mobile:heal:locator Appium endpoint — all in-flight, with no test rewrites.
Traditional maintenance is reactive: a build goes red, an engineer opens the test, finds the changed locator, edits source, raises a PR, waits for CI. Self healing is proactive — the locator is repaired the moment drift is detected, the run stays green, and engineers review repairs from a heal log instead of debugging overnight failures.
Yes. AutoHeal runs on Pcloudy's 5,000+ real Android and iOS devices — not emulators or simulators. The same healing engine is used across UIAutomator2 (Android) and XCUITest (iOS), so cross-platform suites benefit from identical behaviour on real hardware.
Attribute changes (ID, name, class, text, accessibility ID where only the value drifts), small DOM-tree shifts that break XPath or CSS selectors, and renamed resource IDs after refactors. It will not invent locators for brand-new elements or fully redesigned screens — those still need a code change.
Yes. BFSI teams use AutoHeal to keep nightly regression suites green across frequent compliance-driven UI updates, while every repair is logged with a before/after locator and timestamp — giving auditors a clear trail of what changed, when, and on which device.
Add autoheal: true to your DesiredCapabilities and wrap your locator lookups with the mobile:heal:locator script. Your existing TestNG, JUnit, PyTest, WebdriverIO or NUnit suites stay intact — no SDK install, no DSL, no custom framework. Java, Python, JavaScript, C# and Ruby are all supported through Appium's standard executeScript call.
Flaky test detection identifies tests that pass and fail intermittently so engineers can investigate them. Self healing actually repairs the underlying cause — broken locators — at runtime. The two are complementary: detection tells you which tests are unstable, healing keeps the rest of the suite running while drift is happening.