How can I know that an auto-heal happened?
The insights page notifies you when a step has been auto-healed.
In some cases, such as failed test runs as well as local runs, a step does not get auto-healed even if an auto-heal is attempted during the run.
From the insights page, you can identify the specific test run where an auto-heal occurred by taking the following steps:
- Click on the Test Run Summary icon for a specific test.
- In the test run summary modal, click on the Results link.
- On the test output page, select the step that shows the Auto-heal insight.
An auto-healed step
- Click on the Logs tab to get information on the auto-heal, including element history.
Attempted auto-heals can only be identified by reviewing the Logs tab for individual steps.
How does auto-heal work with Configure Find?
If a step uses Configure Find, mabl searches for something that matches the Configure Find attributes until the user-defined timeout. If auto-heal is enabled and a match is not found before the user-defined timeout, mabl attempts to auto-heal.
While attempting to auto-heal, mabl continues to look for an element that matches the Configure Find value(s), widening the search criteria to consider elements that are a partial match and, in the event that no elements match those values, considering elements that do not match the Configure Find values.
How can I turn off auto-heal?
If you do not want a recorded step to auto-heal, add Configure Find to the step and select "Disable auto-heal."
My test auto-healed to the wrong element. What should I do?
If a test step auto-healed to the wrong element, check the element history to see which attributes were updated. To ensure that a specific test step does not select auto-heal to the wrong element again, you can take one of two approaches:
Rollback and edit
If you can identify the correct element attributes in the element history, you can take the "rollback and edit" approach:
- On the test output page, roll back the element history to the correct attributes
- In the Trainer or quick-edit mode, add Configure Find to the step with auto-heal disabled
Retrain the step
If you are not sure which version in the element history represents the correct element, or the step has a shared element history, you can retrain the step:
- In the Trainer, play through to the prior step.
- Delete the step that auto-healed to the wrong element.
- Turn on the Rec button.
- Record the step again.
- Add Configure Find to the step with auto-heal disabled.
Does mabl use auto-heal in local runs?
Yes, in local runs, mabl attempts to auto-heal using the same models and Configure Find values. However, attempted auto-heals in local runs are not saved as auto-heal insights and do not impact the element history, even if the test run passes.