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.

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
Accessible namePlaywright accessible nameRequired with locator kind ROLE

Locator keys

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

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 table lists all elements in the project. Open a folder to list only elements in that folder.
  • 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.

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.2.0 · Last updated 2026-09-11

Did this page help?