Collecting locators with Recorder

It is possible to collect locators using the Recorder, which records the actions of users on the site, saving the locators of the elements with which the user interacts.

When the user records actions in a scenario created in the IDE or added in the Recorder, a ‘default.xml’ file with locators is created.

In the IDE, it is added to the 'locators' - 'pages' directory. The ‘details’ section is filled in automatically with the necessary data.

‘default.xml’ file contains recorded locators. The maximum possible types (id, class, xpath, cssSelector, text) of locators are recorded for each element.

In the Recorder the ‘default.xml’ file is displayed in the ‘Locator File’ field.

While recording the step with the locator 'Locator Id’ is generated automatically. It is a one or two-word name that is as close as possible to the id of the element.

It’s recommended to work with locators from the ‘default.xml’ file right after recording each scenario (rename locators, move them to specified Locator page, etc.) for ease of use, as well as to avoid overwriting some locators by Recorder.

If you change the ‘Locator Id’ and sort the locators by the pages they are on, be sure to change the locator names in the scenarios accordingly.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard