- Elements (Objects)
- Web Applications
Record Single Element
Record Multiple Elements
Create Elements
Supported Locator Types
Formulating Elements
Shadow DOM Elements
Verifying elements in Chrome DevTools
Handling iframe Elements?
Create Image Based Elements
Dynamic Locators using Parameter
Dynamic Locators using Runtime
Using Environment Test Data for Dynamic Locators
Locating Dynamic Elements in Date Widget
Freeze & Inspect Dynamic Elements (WebPage)
Locating Dynamic Elements in Tables
Import/Export Elements
Locator Precedence (Web Apps)
Verify Elements from Test Recorder
Locator Precedence in Test Recorder
While creating tests for web applications, identifying locators accurately for UI elements is important. In Testsigma, you can enhance this process by defining locator precedence on the test recorder. This will prioritize fetching locators such as Link Text, Name, ID, CSS Selector, and XPath based on the priority specified on the recorder, which selects the static and unique locator. This prioritization continues until a locator that meets these criteria is identified.
Prerequisites
Before you begin, ensure that:
- You have installed the Testsigma Chrome Extension. For more information on installing Testsigma Chrome Extension, refer to the documentation on Testsigma Chrome Extension.
- You have a web application that is available for testing.
Configuring Locator Precedence
- From the left navigation bar, go to Create Tests > Elements and click Record.

- This will open a new window with the test recorder and will be ready to start recording. Here, we entered the URL for Simply Travel Web.

- On the test recorder, click on Locator precedence.

- This will open the Locator precedence overlay on Recorder.

- Use the Drag Handle to configure the priority of locators.

The Locator precedence configured for an application from a specific user accessible only to the same user & configured application.
- Click on Save to save the configuration.

Testsigma will revert to the default Locator precedence if you don't save the configuration.
Here's a quick GIF demonstrating how to configure locator precedence in test recorder.
