This feature helps to reduce the “Failed to find item” error when running your automated test. Self-healing overcomes this issue by adding a robust layer of object recognition to avoid exceptions and reduce manual maintenance
Enable Self-healing
Self-healing is enabled by default beginning in version 10.1.1. Below, you can find the steps of how to enable it manually:-
In the top toolbar, click SETTINGS…
-
When the Settings window opens, select the Advanced tab, and click Expert settings…
-
In the Expert path generation settings window, select Robust RanoreXPath (new) from the RanoreXPath generation mode drop-down list.
-
Click Apply and OK.
Record your test
Before the self-healing option, when a test failed to find an object, an error was displayed in the test log and the test reported a failed status. The issue had to be solved to re-run and complete these tests.
The self-healing option finds a similar or the closest object to the missing one in the system while running a test. All the objects are checked based on the attributes that RanoreXPath uses, for more information review Mapping dynamic UI elements.
-
After you enable the self-healing option, start recording your actions by clicking RECORD.
-
When you complete your recording, click Validate located in the Ranorex Recorder window.
-
Once the validation is completed, click Stop to finish your recording. The recording opens in Ranorex Studio.
-
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
-
Click RUN to start running your test. The self-healing option allows the test to find an appropriate object and continue to run without interruptions or errors.