# Self-healing: how a replay rescues a broken locator

Dokimore documentation · Recording and self-healing · Updated 2026-11-01 · 5 min read

Written for: SDETs and automation engineers, QA leads and test managers · Where it applies: every market

> This is how self-healing test automation works here. When a recorded step cannot find its element during a replay, the platform tries the other locators it stored for that element. If one matches, the step continues with it, and the run detail shows the locator that failed, the one that matched and the strategy that found it. Rescues are accepted automatically (folder runs first require a confidence threshold); a review queue for approving them is not available to customers yet.

## Why every rescue is shown

A test that silently re-targets itself to the wrong element passes while the product is broken. That is worse than a failing test, because it looks like a pass. So a rescued step is never silent: the run detail marks it healed and shows the locator that failed, the locator that matched and the strategy that found it, so you can check it after the run and record the step again if the match is wrong.

## How a rescue is found

- The recorder stores several locators per element at record time: test IDs, ARIA roles and names, text, CSS and XPath variants.
- When the primary locator fails, the alternatives are tried in turn, including searches inside frames and open shadow roots, role and text matching, and partial class matches.
- On folder runs, a rescue below the confidence threshold is rejected: the step fails and says so. On other replays the first match is used.

## Checking a rescue

1. Open the run and find the steps marked healed.
2. Compare the locator that failed with the one that matched, and the strategy and confidence shown with it.
3. If the match is wrong, record that step again so the next replay starts from a locator you trust.

## Limits

- A rescue cannot repair a step whose element no longer exists at all. That is a product change, and the step fails instead of guessing.
- Confidence scores are heuristics over captured attributes. They are shown so you can judge them; they are not a promise.
- A review queue where you approve or reject a rescue before it applies is not available to customers yet.
- We do not publish a "maintenance reduced by X%" figure because we have not measured it across customers yet. When we have, it will appear here with the method.

## Questions people ask about this

### Does a person approve each rescue?

Not yet. A rescue is accepted during the run (folder runs require a confidence threshold first) and is shown in the run detail; a customer review queue is not available yet.

### How do I know which steps were rescued?

The run detail marks each healed step and shows the original locator, the one that matched, the strategy and its confidence.

This guide is about the test recorder and self-healing: https://dokimore.com/product/test-recorder

Source: https://dokimore.com/documentation/self-healing-and-heal-review
