flexCorrect (Appium Self-Healing)

flexCorrect is Kobiton’s Appium Self-Healing capability. It selects the correct element across different devices and when layouts change between runs, reducing Element not found errors during automation testing.

How flexCorrect works

flexCorrect supports two Xium automation script types:

  • A Xium automation script generated by Kobiton AI from a manual session.

  • A custom (non-generated) Xium automation script.

flexCorrect requires a baseline automation session before flexCorrect can run — see Prepare a baseline session.

During execution, if an element’s layout changes, flexCorrect uses AI to locate the element and continue the test instead of returning Element not found.

Prepare a baseline session

  1. Run a manual session on a Kobiton device without kobiton:flexCorrect enabled. Note the manual session ID.

  2. Use the manual session ID as the value for kobiton:baselineSessionId when you configure capabilities.

Configure the capability

Add the following capability to your script:

Capability Value

kobiton:flexCorrect

true

Example (Java):

capabilities.setCapability("kobiton:flexCorrect", true);
capabilities.setCapability("kobiton:baselineSessionId", "0000011");

Replace 0000011 with the manual session ID for the baseline session.

Save your changes and run the script.

Limitations

flexCorrect is not available in the following session types:

Best practices

  • Keep flexCorrect enabled as a fallback. If the script finds the expected element, flexCorrect does not change the session behavior.

  • Use a manual session ID as the baseline session ID.

  • Run the baseline session on a device with the layouts you expect flexCorrect to handle in later test runs.

Review correction results

After a session runs, review the Appium self-healing validation results in the session details. The results show which elements were corrected by flexCorrect.

Session Explorer showing the Appium Self-Healing issue count

Pointer hovering over an Appium Self-Healing issue to show a details preview

After a session, you can check how many elements were corrected.