How-to

Focused assert (toBeFocused)

Focused assert (toBeFocused) ​

Expect assertion: focus is on the Target.

Step model ​

action_nametoBeFocused
GroupExpect
TargetRequired
ValueUnused
expected_valueUnused
TEST_ACCOUNTForbidden
Do not confuse withfocus, blur

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

Prerequisites ​

  1. Focus must already be on the element before the assert.

Steps ​

  1. Add a toBeFocused 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 ​

Focus is on email ​

Fields in the UI:

FieldValue
action_nametoBeFocused
Targetkind LABEL, value Email

Step JSON fragment (copy-paste):

json
{
  "action_name": "toBeFocused",
  "target": {
    "kind": "LABEL",
    "value": "Email"
  }
}

Common mistakes ​

  • focus moves focus. toBeFocused asserts that focus is already there.

Screenshots ​

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

Version 1.0.0 · Last updated 2026-10-03

Did this page help?