Creating an XPath
Automation has an XPath Editor to make it easier to generate a reliable XPath for any custom field. This editor helps create an optimized XPath by auto-populating options for the user, offering alternatives where available, and giving instantaneous feedback in the browser window. This editor is available in the Test Builder whenever a field is mapped, and an XPath option is available.
This example shows mapping non-Salesforce fields.
Opening the ProvarX Editor
Start by mapping the field as normal. The Test Builder will present a draft test step with the Field Locator section set to ProvarX:
Using the ProvarX Editor
Within the ProvarX editor itself, there is a list of qualifier attributes that correspond to the available entry:
These qualifier attributes contain all the attributes for the node that the cursor is focused on:
We can add more attributes to the populated Xpath from the Add another dropdown in the editor, as below:
Once selected, the attribute will appear in the editor’s list of attributes to set a value.
Troubleshooting XPaths
If the XPath doesn’t match any elements, an error is shown below. The qualifiers remain editable, so the XPath can be updated to match an element.
If the XPath is invalid, an invalid error will be shown, and the qualifier attributes will be hidden from editing until the XPath is fixed:
Sometimes, the XPath editor will present a warning, for example, if the XPath matches more than one element on the page. In this case, the warning is shown in the editor, but the step can still be added to the test if wanted.
In some cases, a Failed to parse XPath warning may appear. If this happens, the qualifier attributes are hidden until the issue is resolved. If you are unsure how to resolve the issue, file a case via the support portal.
- Provar Automation
- Installing Provar Automation
- Updating Provar Automation
- Using Provar Automation
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Functions
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Override auto-retry for Test Step
- Managing test steps
- Namespace org testing
- NitroX
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reintroduction of CLI license Check
- Reload Org Cache
- Reporting
- Running tests
- Searching Provar with find usages
- Secrets management and encryption
- Setup and teardown test cases
- Tags and Service Level Agreements (SLAs)
- Test cycles
- Test plans
- Testing browser options
- Tooltip testing
- Using the Test Palette
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript locator support
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- ProvarX™
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- DevOps
- Introduction to test scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines Using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team Foundation Server
- Version control
- Provar Automation trial guide and extensions
- Salesforce Testing
- Provar Manager
- Best Practices
- Troubleshooting
- Release Notes