Skip to main content

Appium Self-Healing

Digital.ai AI-Powered Self-Healing reduces the time needed for automation maintenance by identifying and repairing element mismatches in real time during testing. This helps teams focus on fixing defects and increasing coverage.

When end-to-end automation tests are affected by minor UI changes, Self-Healing uses a classification model to try a different element selector. This reduces the time needed for test maintenance between test runs and enables faster feedback while increasing test resilience.

info

Self-Healing is enabled for Native and Web tests in Android, and Web tests in iOS.

During an Appium test execution, when an element is successfully identified, its location in the page structure is saved. Subsequently, when the same element cannot be identified, Self-Healing attempts to reconcile between the saved location and an available element using the page dump.

When an element is successfully healed, the step is marked as “passed” and the locator data is saved in the report.

info

No user data is used in training of the model.

To enable Self-Healing:

  1. Make sure the feature is enabled by your Cloud Administrator (see Appium Self-Healing Configuration).

  2. Use the capability selfHealing and set it to true.

dc.setCapability("selfHealing", true);

Pause Self-Healing

To pause self-healing, use this code:

driver.executeScript("seetest:client.stopHealing");

To resume self-healing, use this code::

driver.executeScript("seetest:client.startHealing");

Healed Locators

You can see information about Healed Locators once the test execution finishes in the test Report Page.

Under the healed step press on the plaster icon and the dialog will present:
Screenshot 2024-06-26 at 13.26.52.png

  • Original Locator

  • Healed Locator

Screenshot 2024-06-26 at 13.25.50.png

  • You can see information about confidence score under Test Data.
    (Confidence score: How common are the Healed Locator and the Original Locator. This is a real number between 0 and 1 (0 and 1 not included). The higher the number is, the more the Healed Locator and the Original Locator similar).

    image-20231101-125613.png