Self Healing Mechanism: Automatic Recovery from Locator Failures

Self Healing in SimplifyQA is a powerful feature designed to minimise test case failures caused by changes in the element locators (like XPath, CSS selectors, etc.). It automatically detects when an object has changed and intelligently generates a new locator, allowing the test to continue with minimal disruption.

Prerequisites

Before Self Healing can be triggered:

  • The test case must have passed at least once with the originally recorded locators.

  • Admin privileges must be used to enable Self Healing under configuration settings.

How Self Healing is Triggered

  • Test Execution Begins:

    • A test case starts execution using the previously saved object locators (like XPath).

    • If any locator is not found during execution, the Self Healing logic is invoked.

  • Healing Process:

    • SimplifyQA searches the DOM to find the closest match based on various attributes like:

      • Element type

      • ID or class similarity

      • Text content

      • Structural proximity

    • It applies an algorithm to generate a new XPath or locator that can successfully interact with the element.

  • Validation & Continuation:

    • If the new locator works, the execution continues without failing the step.

    • The test step is marked as “Healed”, and logs reflect the change.

  • Auto-Update:

    • The newly generated locator is stored for reference.

Last updated