Interactive Demo
See how ContextQA's AI Self-Healing detects broken locators when the UI changes and repairs test steps automatically — without any engineer intervention.
When your application's UI changes between releases, test locators that relied on old element attributes will break. ContextQA's self-healing engine detects these failures at runtime, finds the best matching element on the updated page, and repairs the step automatically — or flags it for manual review when confidence is lower. Select a scenario to see how each case is handled.
UI Change Detected
A button on the checkout page was renamed and its ID was updated between releases.
What changed:
Element ID:
btn-submit→checkout-submit-btnButton text: "Submit Order" → "Place Order"
The stored locator in the test step no longer matches any element on the page. Without self-healing, the test would fail immediately.
AI Agent: Detects that the element referenced in the test step cannot be found using the stored locator, and activates the healing engine.
AI Healing Engine Activates
The self-healing engine evaluates candidate elements on the updated page using visual appearance, semantic role, and surrounding context.
Healing timeline:
Element not found with stored locator
AI locator engine activated
Candidate elements scored by visual and semantic similarity
Best match selected: "Place Order" button,
role=buttonLocator updated in test step
AI Agent: Multiple candidate elements are evaluated and scored. The best match is selected based on how closely it resembles the original element in terms of visual position, role, and surrounding page context.
Auto-Healed ✓
Confidence score: 96% — exceeds the auto-heal threshold.
The locator is automatically updated in the test step. The test continues executing and passes. No engineer action is required.
AI Agent: When confidence exceeds the auto-heal threshold, the repair is applied immediately and the test proceeds. The healed step is logged in the execution results so teams can review what changed.
Decision
Auto-Healed
Action Required
None
Test Result
Passes after healing
Audit Trail
Healed step logged in execution results
UI Change Detected
An element was relocated to a different position in the page layout — a common result of UI redesigns or responsive layout changes.
What changed:
Grid position: row 1, col 3 → row 2, col 1
DOM nesting depth changed
The element still exists on the page, but path-based or position-based locators no longer point to it correctly.
AI Agent: Detects the locator mismatch and activates the healing engine to find the element in its new location.
AI Evaluates Match Quality
The healing engine locates the element in its new position and evaluates how confident it is that this is the correct match.
Healing timeline:
Element not found with stored locator
AI locator engine activated
Candidate elements scored by visual and semantic similarity
Best match selected in new grid position
Locator updated in test step
AI Agent: A position change introduces more uncertainty than a simple rename — the element looks the same but its relationship to surrounding elements has changed, which lowers the overall confidence score.
Healed with Warning ✓
Confidence score: 78% — within the 70–89% range.
The repair is applied, but the step is flagged for manual review. The test is marked as "healed with warning" in the execution results.
AI Agent: Healing is applied so the test can continue running, but the team is notified to review the healed step and confirm the correct element was selected. This prevents false positives from silently accumulating.
Decision
Healed with Warning
Action Required
Manual review recommended
Test Result
Passes after healing (flagged)
Notification
Team notified for review
UI Change Detected
A button's CSS class was significantly changed and a new data-testid attribute was added — a scenario common when a design system is updated or components are refactored.
What changed:
CSS class:
primary-btn→btn btn-primary-v2A new test ID attribute was added to the element
AI Agent: The combination of a class name change and structural refactoring makes it harder to determine with certainty whether the candidate element is the same one the test was originally targeting.
AI Evaluates — Low Confidence
The healing engine finds candidate elements but cannot determine with sufficient confidence that any one of them is the correct match.
Healing timeline:
Element not found with stored locator
AI locator engine activated
Candidate elements scored by visual and semantic similarity
Multiple candidates with similar scores — confidence below threshold
Healing not applied — queued for manual review
AI Agent: When multiple candidates score similarly and none reaches the minimum threshold, applying an automatic repair risks silently changing what the test is actually testing. In this case, human judgment is required.
Manual Review Required
Confidence score: 62% — below the minimum threshold for automatic healing.
No repair is applied. The test step is queued for manual review and the team is notified. The test is marked as requiring attention in the dashboard.
AI Agent: Low-confidence cases are surfaced in the dashboard with the full context of what changed and which candidate elements were evaluated. A team member can review the candidates and confirm or select the correct one with a single click.
Decision
Manual Review Required
Action Required
Team must review and confirm element
Test Result
Not updated automatically
Notification
Team notified immediately
90% and above
Auto-Healed — no action needed
70% – 89%
Healed with Warning — review recommended
Below 70%
Manual Review Required — healing not applied
Try it yourself — 🚀 Start Free Trial → · Book a Demo
Last updated
Was this helpful?