How-to

Field value assert (toHaveValue)

Field value assert (toHaveValue) ​

Expect assertion: the Target field value equals Value.

Step model ​

action_nametoHaveValue
GroupExpect
TargetRequired
ValueRequired (text)
expected_valueUnused
TEST_ACCOUNTAllowed
Do not confuse withtoHaveText, fill

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

Prerequisites ​

  1. Target is a field with a value.

Steps ​

  1. Add a toHaveValue step.
  2. Set Target.
  3. Enter the expected field value in Value.
  4. Save.

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

Examples ​

Buyer email ​

Fields in the UI:

FieldValue
action_nametoHaveValue
Targetkind LABEL, value Email
Valuebuyer@shop.test
value_source_typeINLINE

Step JSON fragment (copy-paste):

json
{
  "action_name": "toHaveValue",
  "target": {
    "kind": "LABEL",
    "value": "Email"
  },
  "value_text": "buyer@shop.test",
  "value_source_type": "INLINE"
}

Common mistakes ​

  • The visible field label is not its value. Use toHaveText or toContainText for a label.

Screenshots ​

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

Version 1.0.0 · Last updated 2026-10-03

Did this page help?