How-to

Hidden assert (toBeHidden)

Hidden assert (toBeHidden) ​

Expect assertion: Target is hidden or absent. A failed step fails the autotest result.

Step model ​

action_nametoBeHidden
GroupExpect
TargetRequired
ValueUnused
expected_valueUnused
TEST_ACCOUNTForbidden
Do not confuse withtoBeVisible, waitForSelector

Target/Value facts match the source-of-truth catalog and Autotest step.

Prerequisites ​

  1. You know the locator of the element that must disappear.

Steps ​

  1. Add a toBeHidden step.
  2. Set Target.
  3. Leave Value empty.
  4. Save.

The step is stored on the autotest. Next - neighbouring steps or autotest run creation.

Examples ​

Dialog is closed ​

Fields in the UI:

FieldValue
action_nametoBeHidden
Targetkind ROLE, value dialog, name Cookie

Step JSON fragment (copy-paste):

json
{
  "action_name": "toBeHidden",
  "target": {
    "kind": "ROLE",
    "value": "dialog",
    "name": "Cookie"
  }
}

Common mistakes ​

  • Both a hidden element and a missing element pass this assert.

Screenshots ​

Screenshots of the step form for toBeHidden will be added here in a later pass.

Version 1.0.0 · Last updated 2026-10-03

Did this page help?