Skip to content

Object Repository

11 min read

An object is an element your recordings act on, such as a Sign in button, kept with its locators (the ways a script finds that element on the page). Each project has one Object Repository, holding the objects of every recorded test case in it.

Scripts use each object’s current locator, so fixing an object once fixes the script of every test case that uses it. Nothing changes without a person: when a new step looks like an element Hawzu already has, Hawzu suggests it, and someone confirms it or keeps it separate.


In a project, select Object Repository in the project navigation. It carries the β beta badge, and appears wherever Record a Test is available and you can view the project’s test cases.

The page header shows the total number of objects, How it works (hover it for a short explanation), Refresh and Columns. Selecting an object opens it in a drawer beside the list, and the browser address then links to that object, so you can share it.


  • When a recording is saved to a test case, each step that acts on an element gets its own object. Steps that act on no element, such as going to an address or a URL is check, get none.
  • A recording made while creating a test case gets its objects once you select Create.
  • Each new object gets a code such as OBJ-12, a name taken from the step, and version 1. It is marked Checked, because it was recorded while someone did the test.

Objects appear shortly after the recording is saved. Until a project has any, the list says Objects appear here after you record a test case.

When a step is removed from its recording, or the recording is deleted, the step stops using its object. The object stays, with its history, and shows as unused if no other step uses it. A deleted test case no longer counts as using any object.


Six tiles above the list each show a count. Select a tile to filter the list to what it counts, and select it again to remove that filter.

TileWhat it counts
ObjectsEvery object in the project. Selecting it clears the other tiles’ filters.
FragileObjects with a red or orange fragility flag.
Hand-editedObjects whose locator was edited by hand and not checked on the page.
UnusedObjects no test case uses.
Failed in CIObjects named in a CI build’s failure in the last 30 days.
WaitingSteps waiting for someone to confirm a suggestion. Opens Suggestions.

The Pages panel on the left starts with All pages, then lists each host with its pages below it and how many objects were recorded on each. Select a page to see only its objects. An object recorded on two pages is counted on both.

Pages that differ only by an ID count as one page, so /projects/42/settings and /projects/97/settings are the same page. The query string is ignored.

Recordings made with Hawzu Recorder 1.2.0 or later store the page of every step. In older recordings, a route change in a single-page app that loads no new page is listed under the page before it, until you record the test again.

ColumnWhat it shows
CodeThe object’s code, such as OBJ-12. Always shown.
NameThe object’s name.
IdentityIts test id, or its role and name, such as button "sign in". no test id or role when it has neither.
PageThe first page it was recorded on, with +N when there are more.
HostThe hosts it was recorded on. Hidden unless you add it.
FragilityIts worst flag, or none. See Fragility.
CheckedChecked, Hand-edited or Not known. See Verification.
Used byHow many test cases use it, or unused, plus N waiting when steps are waiting to be confirmed as this object.
CI failsHow many CI builds in the last 30 days failed naming this object. See CI failures.
VersionIts current version, such as v3.
Last changedWhen it last changed. Hover to see who, or by Hawzu.

Use Columns in the header, or a column header’s menu, to show, hide, pin, sort or resize columns. You can also drag a header to move its column. Your column choices are saved for you.

  • The search box finds objects by code, name, test id or the element’s text.
  • Filters adds Fragility, to show objects with one flag, or Checked, to show Checked on the page: recorded, Checked on the page: picked again or Hand-edited, not checked.
  • Sort by selecting the Code, Name, Version or Last changed header. The list starts with the most recently changed first.

Active filters show as chips above the list. Remove one with its ×, or select Clear all. When nothing matches, select Clear filters. The list shows 50 objects at a time, with Previous and Next.

Each object’s locator is marked with a short word. Hover it to see the whole sentence.

MarkWhat it means
CheckedRecorded while someone did the test, or picked again in the browser with Hawzu Recorder, so it was checked on the page.
Hand-editedSomeone edited this locator by hand. Hawzu has not checked it on the page.
Not knownHawzu has no record of how this locator was checked.

Each flag is about the locator a script actually uses. Hover a flag to see which script it concerns and why.

FlagColourWhat it means
no Selenium locatorRedNo locator Selenium can use, so the Selenium script marks the step HAWZU_TODO.
no Playwright locatorRedNo locator Playwright can use, so the Playwright script marks the step HAWZU_TODO.
frame not locatedRedA frame or shadow host on the way to the element can’t be located, so the scripts mark it HAWZU_TODO.
picks by positionOrangeThe locator picks the element by its position, so it can reach a different element if the page’s order changes.
absolute XPathOrangeThe locator is a path from the top of the page, so a change anywhere above the element breaks it.
text that changesOrangeThe locator matches text that looks like it changes between runs, such as dates, times, amounts or ids.
generated valueOrangeThe locator relies on a test id, id or class that looks generated, which can change with the next build.
hand-edited, not checkedOrangeThe locator was edited by hand and not checked on the page.
may pick by positionGrayThe locator may pick by position. Older recordings don’t store this.

Red flags stop a script from running the step as recorded. Orange ones let it run, but it may break. Gray ones are worth knowing.


Select a row to open the object in a drawer. Its title shows the object’s code and name, with a merged or deleted badge when it is no longer active. At the top are its verification, its worst fragility flag, and Actions. Tiles show its Version and how many Test cases, Recordings and Linked steps use it.

ViewWhat it shows
LocatorWhere the locator came from, its test id or role and name, the pages it was recorded on, its fragility flags, and each locator exactly as a chosen script prints it.
UsageEach test case, recording and step that uses the object, with the step’s state: its own object, waiting for confirmation, confirmed or kept separate.
HistoryEverything that happened to the object, newest first. See Fixing a Locator.
CI failuresCI builds whose failure named this object.

An object with no test id, and no role with a name, says so in its Locator view. Hawzu never suggests that another step is that element.


When you import results from a CI build, Hawzu reads the failure message of each failed or blocked test case that has recordings. A failure is linked to an object when the message names the object’s locator (as Playwright’s errors and Selenium’s “no such element” error do), or when it is the message a script’s check prints when that check fails.

Select CI failures on an object to list those builds, newest first, for the last 7 days, 30 days or 90 days. Each result shows the test case, its status, the failure message, and how it matched: Matched the locator (vN) or Matched the check. Failures from an object later merged into this one are marked from merged OBJ-….

Hawzu can’t link a failure when:

  • the script was downloaded before its step was confirmed as a shared object, so the file still prints the step’s own recorded locator;
  • the failure is about a frame or shadow host on the way to the element, not the element itself; or
  • an older Playwright version names the frame with frameLocator(…) in its error.

When a recording is saved to a test case, Hawzu compares each step with the project’s existing objects. It suggests a match only when the step and the object:

  • share a test id, such as data-testid=login, or the same role and name, such as button "sign in";
  • were recorded on the same page, in the same frame or shadow root; and
  • haven’t already been kept separate by someone.

Steps found only by CSS, XPath or visible text are never suggested anything, because those change too easily to prove two steps are one element. Each suggestion says why in words, such as Same test id data-testid=login on app.example.com/login, same element type <button>.

You can decide in Suggestions in the Object Repository, or on the recording’s Locators tab, where a suggested step shows This may be an element Hawzu already has.

  1. Open Object Repository and select Suggestions above the list, or the Waiting tile. The number beside Suggestions is how many steps are waiting.

  2. For each step, read why each object is suggested. When a step has more than one suggestion, the first is marked Best match.

  3. Select Confirm beside the object the step is, or Keep separate if it is none of them.

To confirm several at once, select the steps, or Select all on this page, then Confirm the best suggestion for N steps. A summary then says how many were confirmed, lists any that couldn’t be, and says how many test cases’ scripts changed.

Confirm makes the step use that object from then on, so a later fix to the object reaches this step’s scripts too. If the step’s own object was untouched (still version 1, never renamed, used by no other step), it is merged into the object you confirmed.

Keep separate leaves the step on its own object, and those objects are not suggested for it again. A confirmed step can’t be kept separate. Split it instead.


Changing objects is for workspace owners, workspace managers and project managers. Fixing, reverting, merging, splitting and deleting each end with a dialog listing the affected test cases, whose scripts you should download again. See Download the affected scripts again. Renaming changes no script.

  1. Open the object whose steps should move, select Actions, then Merge into….

  2. Find the object to merge into. The list starts on this object’s page. Choose another page, Any page, or search. Only objects in the same frame or shadow root are listed.

  3. Select the object, then Merge into OBJ-n (N test cases).

  4. If the two were recorded on different pages, Hawzu shows Recorded on different pages. Select Merge anyway to go ahead.

Every step that used the merged object now uses the other object’s locator. The merged object is kept in history as merged.

  1. Open the object and select Usage.

  2. Beside the step, select Use its recorded locator.

  3. Select Split the step.

The step gets a new object of its own, made from the locator it was recorded with.

  1. Open the object, select Actions, then Rename.

  2. Enter a name of up to 120 characters and select Rename.

Scripts name objects by code, never by name, so renaming changes no script.

  1. Open the object, select Actions, then Delete.

  2. Read which test cases it affects, under What this changes.

  3. Select Delete OBJ-n.

Each step that used the object gets its own object again, made from the locator it was recorded with. The deleted object’s history is kept.


  • Each time Hawzu builds a script, when you open or download it, the script uses each linked object’s current locator. The recording itself, its Steps tab and the manual steps written from it still describe what was recorded.
  • The script’s header lists the objects by code and version, such as Object Repository: OBJ-3 v2, OBJ-9 v1 (hand-edited, not checked). The script tab shows the same as Uses N objects (M hand-edited).
  • A file you already downloaded does not change. After an object changes, download the affected scripts again.

On a recording’s Locators tab, each step that uses an object shows a chip such as OBJ-12 v3 · Sign in button · checked on the page. Select it to open the object. When the object’s locator differs from what was recorded, a toggle switches between Script uses: OBJ-12 v3 and Recorded.


ActionWho can do it
View the Object Repository, its objects, suggestions and historyAnyone who can view test cases in the project
Confirm or keep separate a suggestionWorkspace owners, workspace managers and project managers
Merge, split, rename or delete an objectWorkspace owners, workspace managers and project managers
Fix a locator or revert to an earlier versionWorkspace owners, workspace managers and project managers

For everyone else, Actions, Confirm and Keep separate are disabled, and Use its recorded locator and Revert to this version are not shown. There is no separate permission to grant a custom role.