AI Self-Healing (Beta)
Overview
AI Self-Healing for locators is an intelligent safety net for automated tests. When a web page changes slightly, such as a button moving, an attribute changing, or the DOM structure being updated , tests can fail because the original XPath locator no longer matches the target element.
AI Self-Healing automatically detects these failures, analyzes the current page structure, and uses AI-driven analysis to generate a new working locator with minimal manual intervention.
This capability helps teams reduce locator maintenance, improve automation resilience, and keep regression suites stable as applications evolve.
Enabling AI Self-Healing
As this is a Beta feature, AI Self-Healing must be explicitly enabled in the provar.properties file located at: <UserHome>/Provar/provar.properties
Add the following property:
com.provar.ai.healing.enabled=true
Note: AI capabilities must be enabled in order to use AI Self-Healing.
Configuring Confidence Threshold
AI Self-Healing uses a confidence score to determine whether a healed locator is reliable enough to be accepted during execution.
The confidence threshold can be configured in the provar.properties file using the following property:
com.provar.ai.healing.confidence=<value>
Supported Values
- Value range: 0.0 – 1.0
- Default value: 0.80
Example
com.provar.ai.healing.confidence=0.85
Increasing the confidence threshold makes healing more conservative by accepting only highly confident locator matches. Lowering the threshold may allow more aggressive healing but can increase the risk of incorrect element matching.
Value
As applications evolve, even small UI updates can break existing locators:
- Attributes renamed
- DOM structure changes
- UI components updated
- Layout refactoring
Without self-healing, a single UI change can break dozens of automated tests. Teams often spend significant time investigating failures caused by broken locators instead of actual product defects.
AI Self-Healing minimizes this maintenance overhead by automatically recovering from locator failures, helping teams:
- Reduce test maintenance effort
- Improve regression suite stability
- Accelerate release cycles
- Increase confidence in automation results
How It Works
When a locator fails during execution:
- Provar detects the failed XPath locator.
- The system analyzes the current DOM structure.
- A progressive search attempts to identify valid parent context.
- AI evaluates candidate elements using page structure and semantic information.
- A healed XPath locator is generated.
- The healed locator is validated and reused during execution.
Supported Healing Scenarios
1. Partial XPath Failure
When part of the XPath still matches the page structure, the system performs a progressive XPath search to identify the deepest valid parent element and use it as the search context.
Example
Failed XPath:
//div[@id=’main’]//form[@class=’login’]//input[@name=’username’]
Suppose the attribute changes from:
username → uname
Progressive Breakdown
Step 1: //div[@id=’main’] → 1 match ✓
Step 2: //div[@id=’main’]//form[@class=’login’] → 1 match ✓
Step 3: //div[@id=’main’]//form[@class=’login’]//input[@name=’username’] → 0 matches ✗
This approach efficiently handles minor UI updates while preserving the original structural intent of the locator.
2. Full XPath Failure
If the entire XPath fails to match any element, the system captures a minified snapshot of the visible DOM and analyzes potential candidate elements.
During this process, the system:
- Extracts hints from the failed XPath
- Normalizes field names for better matching
- Evaluates possible elements using internal scoring algorithms
- Identifies the most likely candidate element
Example
Failed XPath:
//input[@name=’username’]
If the attribute changes from:
username → uname
The system analyzes similar elements in the DOM and attempts to identify the correct replacement element.
AI Locator Generation
The AI service receives structured page context and generates a corrected locator.
Inputs
The following information is provided to the AI service:
- Field Name , Semantic identifier used in the test
- Failed XPath , Original locator that no longer matches
- Region XPath , Nearest valid parent element used as context
- DOM Snapshot , Simplified representation of the visible page structure
Outputs
The AI service returns:
- Healed XPath locator
- Confidence score (0.0 – 1.0)
Healing Principles
AI locator generation follows strict reliability principles:
- Uses only attributes that exist in the DOM
- Matches element types with correct HTML tags
- Preserves the structural intent of the original XPath
- Prioritizes stable attributes over fragile ones
To minimize incorrect healing, a default confidence threshold of 0.8 is used. Only locators meeting or exceeding this threshold are accepted.
Locator Persistence
Once a healed locator is verified:
- It is used immediately during execution
- It is saved locally within the project directory
- Future executions reuse the healed locator automatically
Healed locators are stored in:
ai-locator-fallbacks.ndjson
This file maintains a history of healed locators for reuse across future test runs.
Key Considerations
AI Self-Healing is intended to recover from locator failures caused by UI changes. It does not resolve functional defects or incorrect test logic.
The following scenarios are outside the scope of healing:
| Situation | Reason |
| Non-generic XPath locators | Only generic ProvarX (XPath) locators are supported |
| Element removed from the page | The application behavior has changed and the test must be updated |
| Multiple parallel iframes | Healing currently supports single iframe contexts only |
| AI confidence below threshold | Results below 0.8 confidence are rejected |
Frequently Asked Questions
Does healing run on every test failure?
No. Healing is triggered only when an element cannot be found using its original XPath locator. Other failures , such as incorrect data, functional defects, or network issues , are not affected.
Will I know when healing has occurred?
Yes. Healed locators are logged and stored in:
ai-locator-fallbacks.ndjson
This provides visibility into what was healed, when it occurred, and the associated confidence score.
What data is sent to the AI service?
Only DOM structure and locator context information are sent to the AI service. No user data or application business data is transmitted.
The following information may be included:
- WebElement name
- Failed XPath
- DOM snapshot
- Region XPath
What happens if the AI cannot find a fix?
The test fails normally and the failure is logged. Healing never silently passes a test that could not be successfully recovered.
Are healed locators permanent?
Healed locators are stored and reused across future executions, but they are not automatically written back to the source Page Object.
Teams should:
- Review healed locators
- Validate their correctness
- Update the original locator as part of regular maintenance
Does AI Self-Healing support all locator types?
No. AI Self-Healing currently supports generic XPath locators only.
Metadata-driven fields already benefit from Provar’s existing metadata-based self-healing capabilities, so AI healing is primarily intended for non-metadata-based generic XPath locators.
- Home
- Provar MCP
- Get Started with V3
- System Requirements
- Automation V3: Skip Welcome Screen on Launch
- Browser and Driver Recommendations
- Installing Provar Automation V3
- Updating Provar Automation V3
- Licensing Provar Automation V3
- Automation V3: Granting Org Permissions to Provar Automation
- Automation V3: Optimizing Org and Connection Metadata Processing in Provar
- V3 Connections
- AI with Provar Automation V3
- AI Self-Healing (Beta)
- Closing the AI Quality Gap with Provar
- FAQ: Provar AI Capabilities
- Automation V3: Understanding Provar’s Use of AI Service for Test Automation
- Automation V3: Enable or Disable AI Features in Provar
- Automation V3: Provar Assistant
- Automation V3: Image Validator
- Automation V3: Intent Validator
- Automation V3: Test Data Generation
- Automation V3: Test Step Generation
- Automation V3: Utterance Generator
- Automation V3: Simplified Agentforce Agent API Testing
- Using Provar Automation V3
- Automation V3: Content Synchronization
- Automation V3: Feature-by-Feature Guide
- Automation V3: Provar Automation
- Automation V3: Creating a New Test Project
- Automation V3: Import Test Project from a File
- Automation V3: Import Test Project from a Remote Repository
- Automation V3: Import Test Project from Local Repository
- Automation V3: Commit a Local Test Project to Source Control
- Automation V3: Salesforce API Testing
- Automation V3: Behavior-Driven Development
- Automation V3: Consolidating Multiple Test Execution Reports
- Automation V3: Creating Test Cases
- Custom Table Mapping in V3
- Functions in V3
- Automation V3: Using Functions
- Automation V3: Count
- Automation V3: DateAdd
- Automation V3: DateFormat
- Automation V3: DateParse
- Automation V3: GetEnvironmentVariable
- Automation V3: GetSelectedEnvironment
- Automation V3: IsSorted
- Automation V3: Not
- Automation V3: NumberFormat
- Automation V3: Round
- Automation V3: StringNormalize
- Automation V3: StringReplace
- Automation V3: StringTrim
- Automation V3: TestCaseErrors
- Automation V3: TestCaseName
- Automation V3: TestCaseOutCome
- Automation V3: TestCasePath
- Automation V3: TestCaseSuccessful
- Automation V3: TestRunErrors
- Automation V3: UniqueId
- Automation V3: Debugging Tests
- Automation V3: Creating Custom Test Steps
- Automation V3: Defining Proxy Settings
- Automation V3: Environment Management
- Automation V3: Exporting Test Projects
- Automation V3: Japanese Language Support
- Automation V3: Customize Browser Driver Location
- Automation V3: Managing Test Steps
- CBMT in V3
- Automation V3: Provar Test Builder
- ProvarDX in V3
- Automation V3: Refresh and Recompile
- Automation V3: Reintroduction of CLI license Check
- Automation V3: Reload Org Cache
- Automation V3: Reporting
- Automation V3: Running Tests
- Automation V3: Searching Provar with Find Usages
- Automation V3: Secrets Management and Encryption
- Automation V3: Setup and Teardown Test Cases
- Automation V3: Tags and Service Level Agreements (SLAs)
- Test Cycles in V3
- Automation V3: Test Plans
- Automation V3: Testing Browser – Chrome Headless
- Automation V3: Testing Browser Options
- Automation V3: Tooltip Testing
- Using Custom APIs in V3
- Callable Tests in V3
- Data-Driven Testing in V3
- Page Objects in V3
- Automation V3: Introduction to XPaths
- Automation V3: Creating an XPath
- Automation V3: JavaScript Locator Support
- Automation V3: Maintaining Page Objects
- Automation V3: Refactoring Page Objects
- Automation V3: Mapping Non-Salesforce Fields
- Automation V3: ProvarX™
- Automation V3: Refresh and Reselect Field Locators in Test Builder
- Automation V3: Create different page objects for different pages
- Applications Testing in V3
- Automation V3: Database Connections
- Automation V3: PDF Testing
- Automation V3: Email Testing in Automation
- Automation V3: Email Testing Examples
- Automation V3: Gmail Connection in Automation with App Password
- Automation V3: App Configuration for Microsoft Connection in MS Portal for OAuth 2.0
- Automation V3: OAuth 2.0 Microsoft Exchange Email Connection
- Automation V3: Support for Existing MS OAuth Email Connection
- Automation V3: OAuth 2.0 MS Graph Email Connection
- Automation V3: Create a Connection for Office 365 GCC High
- Automation V3: Mobile Emulation (Salesforce Mobile)
- Automation V3: Using Provar with Amazon Web Services (AWS) Device Farm
- Automation V3: Web Services
- Provar for Microsoft Dynamics 365: Supported Capabilities
- Automation V3: Integrating with Jira
- Automation V3: Provar Feature Flags and Properties Configuration
- Automation V3: Using Java Method Annotations for Custom Objects
- Automation V3: Test Palette Introduction
- Automation V3: Apex Bulk
- Automation V3: Apex Execute
- Automation V3: Assert Test Step
- Automation V3: Assert Salesforce Layout
- Automation V3: Break Test Step
- Automation V3: Extract Salesforce Layout
- Automation V3: Fail Test Step
- Automation V3: Finally Test Step
- Automation V3: For Each Test Step
- Automation V3: Generate Test Case
- Automation V3: Group Steps Test Step
- Automation V3: If Test Step
- Automation V3: List Compare
- Automation V3: Page Object Cleaner
- Automation V3: Read Test Step
- Automation V3: Set Values Test Step
- Automation V3: Set Values
- Automation V3: Sleep Test Step
- Automation V3: String Test Steps
- Automation V3: Switch Test Step
- Automation V3: UI Action
- Automation V3: UI Assert
- Automation V3: UI Connect
- Automation V3: UI Fill
- Automation V3: UI Handle Alert
- Automation V3: UI Navigate
- Automation V3: UI On Screen
- Automation V3: UI With Row
- Automation V3: Wait For Test Step
- Automation V3: While Test Step
- Automation V3: Override Auto-Retry for Test Step
- Automation V3: Using Encrypted Password Variables in Expression Editors
- DevOps with V3
- Automation V3: Introduction to Provar DevOps
- Automation V3: Introduction to Test Scheduling
- Automation V3: Setting Java Development Kit (JDK) Environment Variables
- Automation V3: Configuration on Jenkins
- Automation V3: Version Control and DevOps
- Automation V3: Setting up Continuous Integration
- Automation V3: Execution Environment Security Configuration
- Automation V3: Bitbucket Pipelines
- Automation V3: Perfecto Mobile
- Automation V3: ANT Task Parameters
- Automation V3: Provar Jenkins Plugin
- Automation V3: Running Automation Tests on Jenkins
- Automation V3: Configuring the Automation Secrets Password in Microsoft Azure Pipelines
- Automation V3: Parallel Execution in Microsoft Azure Pipelines using Test Plans
- Automation V3: Parallel Execution in Microsoft Azure Pipelines using Targets
- Automation V3: Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Automation V3: Parallel Execution in GitHub Actions using Test Plan
- Automation V3: Running Provar on Linux
- Automation V3: CircleCI Orbs
- Automation V3: CircleCI Common Build Errors
- Automation V3: CircleCI via Docker
- Automation V3: Copado Integration Introduction
- Automation V3: Copado Configuration
- Automation V3: Copado Architecture Overview
- Automation V3: Docker Runner
- Automation V3: Running Provar Tests on Docker using Docker File
- Automation V3: Docker Continuous Integration
- Automation V3: Setting up Continuous Integration with Jenkins for Docker
- Automation V3: Generating the build.xml File for Docker
- Automation V3: Flosum Configuration
- Automation V3: Flosum Integration Introduction
- Automation V3: Flosum Architecture Overview
- Automation V3: Parallel Execution in GitHub Actions using Multiple build.xml Files
- Automation V3: Parallel Execution in GitHub Actions using Targets
- Automation V3: Remote Trigger in GitHub Actions
- Automation V3: Parallel Execution in GitHub Actions using Job Matrix
- Automation V3: Gearset DevOps CI/CD via Jenkins
- Automation V3: GitLab Continuous Integration
- Automation V3: GitHub Desktop – Creating a Git Repository for Automation Projects
- Automation V3: Integrating GitHub Actions CI to Run Automation CI Task
- Automation V3: Provar Test Results Package
- Automation V3: Running a Provar CI Task in Azure DevOps Pipelines
- Automation V3: Amazon Web Service (AWS) & Jenkins Configuration
- Automation V3: ANT: Generating ANT Build File
- Automation V3: ANT Licensing
- Automation V3: Reading Data from Excel
- Automation V3: Configuration on other CI tools
- Automation V3: Setting Apache Ant Environment Variables
- Automation V3: BrowserStack Desktop
- Automation V3: Integrating with LambdaTest
- Automation V3: Sauce Labs Desktop
- Automation V3: AutoRABIT Salesforce DevOps in Provar Test
- Automation V3: Selenium Grid
- Automation V3: Working with Git
- Automation V3: Configuration for Sending Emails via the Automation Command Line Interface
- Automation V3: Parameterization using Environment Variables in GitHub Actions
- Automation V3: Slack Integration with Automation
- Automation V3: Zephyr Cloud and Server
- Automation V3: Adding a Salesforce Communities Connection
- Automation V3: Integrating with Sauce Labs Real Device
- Automation V3: Travis CI
- Automation V3: Salesforce DX Integration
- Automation V3: Variable Set Syntax
- Automation V3: Visualforce Testing
- Automation V3: List and Table Testing
- Automation V3: Salesforce Lightning Web Component (LWC) Locator Support
- Automation V3: Salesforce Console Testing
- Recommended Practices with V3
- Automation V3: Provar Naming Standards
- Automation V3: Object Mapping Between Provar Automation and Provar Manager
- Salesforce API Access Control Security Update – Impact on Provar Connections
- Automation V3: Salesforce Connection Best Practices
- Automation V3: Automation Planning
- Automation V3: Supported Testing Phases
- Automation V3: Best practices for the .provarCaches folder
- Automation V3: Best practices for .pageObject files
- Automation V3: Avoid Metadata performance issues
- Automation V3: The Best Ways to Change Callable Test Case Locations
- Automation V3: Improve Your Metadata Performance
- Automation V3: Abort Unused Test Sessions/Runs
- Automation V3: Create Records via API
- Automation V3: Test Case Design
- Automation V3: Increase auto-retry waits for steps using a global variable
- Troubleshooting with V3
- Automation V3: How to Use Keytool Command for Importing Certificates
- Automation V3: Resolving High Memory Usage
- Automation V3: Refresh Org Cache Manually
- Automation V3: Show Hidden Provar Files on Mac
- Automation V3: Add Permissions to Edit Provar.ini File
- Automation V3: Test Builder Does Not Launch
- Automation V3: Provar License Issue Solution
- Automation V3: How to Configure a Single Sign-On Connection
- Automation V3: Out of Memory Error During CI Execution
- Automation V3: Add Gmail Firewall Exception
- Automation V3: Add a License Firewall Exception
- Automation V3: Resolving Jenkins License Missing Error
- Automation V3: Increase System Memory for Provar
- Automation V3: Resolving Metadata Timeout Errors
- Automation V3: Java Version Mismatch Error
- Automation V3: Provar Manager 3.0 Install Error Resolution
- Automation V3: Test Case Does Not Run on IE Browser
- Automation V3: Test Builder Not Working Correctly
- Automation V3: Internationalization Support
- Automation V3: Salesforce Release Updates
- V3 Release Notes