Self-healing reduces test failures caused by "Failed to find item" errors. When Ranorex Studio cannot find a specific UI element during test execution, the self-healing mechanism searches for the closest matching object.
Enable self-healing
If you use a version older than 10.1.1, or if you previously disabled the feature, follow these steps to enable it:
- Open the solution in Ranorex Studio and open the Settings dialog.
- Go to Advanced > RanoreXPath settings > Expert settingsā¦.
- In the RanoreXPath generation mode drop-down list, select Robust RanoreXPath (new).
- Select Apply and then OK.
Once enabled, self-healing works automatically during test execution. All the objects are checked based on the attributes that RanoreXPath uses. You can validate its impact through the test report.
Record your test
Follow these steps to observe the behavior of the self-healing feature:
- Record your test module: Create a recording as usual. With Robust mode enabled, Ranorex automatically generates a RobustPath property for each new repository item.
-
Review the generated RobustPath: In your items section, expand the ApplicationUnderTest. When you select a sub-item, note the RobustPath under the Properties section located on the right side window.
- Execute the test: Run the test suite or recording.
-
Analyze the report: Open the test report. Actions resolved by self-healing appear with a "Warning" status message instead of an error.