Elements
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
Section titled “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.

- Click on Save to save the configuration.
