What is a locator?
A Locator is a mechanism used to distinguish and uniquely identify elements (such as buttons, input forms, and links) targeted for operations or assertions on a web page.
In Autify Nexus, locators are generated during recording using hierarchical information like CSS selectors and XPath, as well as attribute information (such as role, text, and custom attributes) to identify the target element.
Overview of the feature
This feature allows you to prioritize user-specified HTML attributes when generating locators.
In addition to standard HTML attributes like class and id, you can also specify custom attributes (such as data-*).
This enables the generation of optimal locators tailored to your implementation, whether the application under test has custom attributes or relies on standard HTML attributes.
Instructions
Click the Settings icon in the navigation bar.
Click the Advanced configuration button in the Recording and local execution settings section to expand the detailed settings.
Enter the HTML attribute name you want to use in the Preferred HTML attribute for locators input field (e.g.,
data-w-id,data-qa)..png?sv=2022-11-02&spr=https&st=2025-12-06T03%3A30%3A32Z&se=2025-12-06T03%3A41%3A32Z&sr=c&sp=r&sig=tmSAlaB0LkX%2F%2BKEp0bXx6Q6b1HZAQcG9zSxJJWTq35M%3D)
Click the Done button to save the settings.
Notes
If the specified attribute exists with the same value on multiple elements within the page, or if the specified attribute does not exist on the element, the conventional locator generation logic will be used.
This applies to new recordings after changing the settings. Locators in existing scenarios will not be changed.
Settings are not shared across different devices or users.