How-to

Binding a Target from the object repository

Binding a Target from the object repository

Binding a Target from the object repository attaches a saved page or element to a step so you do not copy the locator or path into every autotest. When the catalog has no entry, set Target with an on-step locator instead.

Prerequisites

  1. An autotest card is open with a step where Target is required or allowed.
  2. The needed record exists in the object repository, or you are ready to set a locator on the step.
  3. For Value source TEST_ACCOUNT on the same step, Target must not be a repository page.

Steps: element as Target

  1. Open the step and find the Target field.
  2. Choose an element from the object repository (kind ELEMENT).
  3. Confirm the element locator fits the action (click, fill, toBeVisible, and other actions that require Target).
  4. Fill Value per the action rules; the source may be INLINE or TEST_ACCOUNT when the action allows it.
  5. Save the step.

The step references one catalog element. Changing the element locator updates every step bound to it.

Steps: page as Target

  1. Open a step where Target is a path or page (per scenario meaning and action rules).
  2. Choose a page from the object repository (kind PAGE).
  3. Do not set Value source to TEST_ACCOUNT on this step: the combination is forbidden.
  4. Save the step.

A page provides a reusable path. For goto, waitForURL, and toHaveURL, pick a catalog page: the step form clears Value and substitutes the record path. A relative path joins the run starting domain. Store a screen on a team subdomain as a full URL on the page card.

Steps: on-step locator (no catalog)

  1. In Target, choose the on-step locator mode (not a repository record).
  2. Set kind: ROLE, LABEL, PLACEHOLDER, TESTID, TEXT, CSS, ID, NAME, XPATH, or SELECTOR. Do not confuse LABEL (field label) with TEXT (visible text): Autotest step.
  3. Set the locator value. For ROLE, add the accessible name when needed (name / accessible name).
  4. Save the step.

The locator lives only on this step. Prefer an object-repository element for repeated targets.

When to use which

OptionWhen
Repository elementThe same control appears in several autotests
Repository pageA shared page path without duplicating the string in steps
On-step locatorA one-off Target or a draft before catalog entry

Examples

Repository element by label + fill

UI fields:

FieldValue
action_namefill
Targetrepository element «Email field»
Valuelogin
value_source_typeTEST_ACCOUNT
value_source_fieldlogin

JSON fragment (illustration; substitute your element id):

json
{
  "action_name": "fill",
  "target": { "repository_element_id": "elem_email" },
  "value_text": "login",
  "value_source_type": "TEST_ACCOUNT",
  "value_source_field": "login"
}

On-step locator without the repository

json
{
  "action_name": "click",
  "target": { "kind": "ROLE", "value": "button", "name": "Save" }
}

Forbidden: TEST_ACCOUNT + page

Do not save a step where Value comes from TEST_ACCOUNT and Target is a repository page. Choose an element or locator, or switch the source to INLINE.

Version 1.1.0 · Last updated 2026-09-14

Did this page help?