> For the complete documentation index, see [llms.txt](https://docs.qyrus.com/web-testing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qyrus.com/web-testing/advanced-features/healer.md).

# Healer AI

Tests break when an application changes. A button gets a new id, a class is renamed, and a step that worked yesterday cannot find its element today — even though nothing is actually wrong with the application.

**Healer AI** catches that. When a step fails to find its element, it compares the page against the last run that passed, works out which element the step meant, and offers you corrected locators.

## What it needs before it can help

Healer works by comparison, so it needs something to compare against — **a previous run of that script that passed**. Without one there is no baseline and nothing to heal.

* A test suite in Test Lab or a sprint. See [Test Lab](/web-testing/run/testlabrun.md) and [Sprints](/web-testing/run/sprintrun.md).
* At least one successful execution of the script.

**Healer is not available on dry runs.** Use **Execute Test**.

## Turning it on

1. From Test Lab or a sprint, tick your script or suite and choose **Execute** → **Execute Test**.
2. In the run configuration, open the **Healer AI** tab.

   ![The Healer AI tab](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-683872b3f16a004ad07795dddaa1251152df326e%2Fadvanced-healer-01.png?alt=media)
3. Switch on **Run With Healer**. The **Summary** panel on the right confirms it with **Executing with Healer**.
4. Click **Run Test**.

Enabling Healer AI means accepting the Qyrus AI terms of use, shown on the same tab. The notice states the AI runs without internet connectivity and your data stays private.

## Finding what it healed

Open the report's **Executions** tab. Runs that used Healer AI carry their own icon in the row.

![Executions with a healed run](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-c96e811e5dbbcfd5d54aac216ceaa1a7c19ccaed%2Fhealer_3.png?alt=media)

Open the run, find the failed step, and click the **Healer** icon on it.

![The Healer icon on a failed step](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-05e8517f57ffd8e5257c75bd2256e4695a4be0f7%2Fhealer_6.png?alt=media)

## Choosing a locator

Healer AI proposes replacement locators under **Healer Response** — usually three: an **ID**, a **Class** and an **XPath**.

![The Healer Response panel](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-de92536c88b31daebeee4d1a1cd85c222d42acaf%2Fhealer_7.png?alt=media)

Pick the one you want, then choose what to do with it.

| Option                      | What it does                                                          |
| --------------------------- | --------------------------------------------------------------------- |
| **Save and Run**            | Updates the step with the locator you chose and runs the script again |
| **Go to Test**              | Opens the step so you can change it yourself                          |
| **Apply Changes to Script** | Updates the step with the chosen locator, without running             |

![Applying a healed locator](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-98c77a39c8c1e824e7cddc69daaee7660f1fa152%2Fhealer_10.png?alt=media)

Prefer an **ID** where one is offered — ids tend to survive redesigns better than a long XPath tied to page structure.

## Where to go next

| To read about                              | Go to                                                             |
| ------------------------------------------ | ----------------------------------------------------------------- |
| Reading the reports Healer writes into     | [Sprint Reports](/web-testing/analyze/sprints.md)                 |
| Comparing a page's appearance between runs | [Visual Testing](/web-testing/advanced-features/visualtesting.md) |
