Element reference

Element

Element ​

An element in the object repository is a named locator reused by autotest steps. It keeps locator data in the project catalog instead of repeating it inline in each step.

Repository element card

Relations ​

Related elementHow it connects
ProjectRequired owner
FolderOrganizes elements in the ELEMENT catalog
PageScreen where the locator is used
Autotest stepOptional catalog Target for a locator action
TagOptional labels on the card and in the listing

Fields ​

LabelContentRule
NameHuman-readable element nameUse a name that identifies the control on its page
Locator kindLocator strategyMust match the stored locator value
Locator valueValue used to find the nodePrefer a value that matches one node. <<name>> is replaced from the run parameter of that name
Accessible namePlaywright accessible nameRequired with locator kind ROLE. The same <<name>> token is replaced

Locator keys ​

The worker accepts selector, css, id, name, placeholder, label, testid, title, alt, role, accessible_name, and text. When more than one key is present, the first filled key is used. title is the title attribute. alt is the image alternative text.

Rules ​

  • Pages and elements use separate catalogs. A folder has kind PAGE or ELEMENT and cannot mix both.
  • Create folders in the Elements tree. An element may sit in a folder or have no folder.
  • At the tree root the section lists all elements in the project. Open a folder to list only elements in that folder. Table and List show the same rows.
  • Drag an element from the table onto a folder in the tree to move it, including onto an empty folder. After the drop the element stays visible inside that folder.
  • Select a catalog element as Target for actions such as click, fill, toBeVisible, and toHaveAttribute.
  • At run time, the worker resolves the catalog item to the same locator accepted by an inline Target.
  • Use accessible_name together with role.
  • Prefer exact, unique locators.
  • On Table, checked rows show selected table rows.
  • On the Where used tab, the Autotest case column shows the autotest name. When the name is empty, the identifier is shown. Go to opens that autotest.

Limits ​

  • Check syntax validates the stored locator shape but does not open the site.
  • Playwright strict mode fails at run time when a locator matches more than one node.
  • A CSS selector with *= performs a substring match. For example, a link ending in /4 can also match /42.
  • Links that open a new tab should be checked for visibility or opened with goto and a full URL.

Version 1.6.0 · Last updated 2026-10-27

Did this page help?