Web Locators Settings (version 5.7.1-7.6.0)
This documentation is for Katalon Studio version 5.7.1 to 7.6.0. If you are using Katalon Studio version 7.6.0 onwards, refer to this documentation: Selection Methods for Web Tests.
Download the latest version of Katalon Studio: Katalon Studio.
Web Locators Settings for Katalon Studio version 5.7.1-7.6.0
You can set the default Web Locator in Project Setting > Test Design > Web Locators.
While recording or spying the app under test (AUT), the Web Locator setting helps eliminate the repetitive task of selecting/deselecting locators for each captured object. The locators in this setting apply to all captured objects in Record and Spy Web.
- An active Katalon Studio Enterprise License.
Web Locators Settings
- By default, any new project uses the XPath option.
- The XPath option does not apply to Internet Explorer. Internet Explorer always uses the Attributes option.
- The web locator Selection Method also carries over to Record Web Utility, Spy Web Utility, and Test Object View.
For better object recognition, Katalon Studio supports relative XPath. If an element cannot be consistently located using its direct attributes, Katalon Studio identifies that element by using its more robust neighbors. This method is visually intuitive as it reflects the way users often identify a visible element on the user interface.
With Web Locator, you can:
- Locate Web elements by clustering visualization.
- Preserve the relationship between an element and its indicator in an item.
- Generate reliable locators to reduce test script maintenance costs.
You can prioritize XPaths by dragging and dropping any XPath on the list. Katalon Studio uses the first XPath as the default to locate the elements. If the first one fails, the remaining XPaths of the list are leveraged to locate the element.
Captured objects have properties listed as below:
Katalon Studio supports the regular XPath with locator strategies. You can also add custom locators to the list. Pre-selected locators are recommended by the Katalon team.
By default, the tag property is selected. If you do not want this behavior, you can deselect the tag property from the list.
When you spy or record test steps, any object having this tag property is not used by default.
Working with Angular pages, you might want to use ng-model and ng-pattern properties by default. Add these properties to the list.
These selected properties are checked by default when you Spy or Record your test steps: