How-to
Empty assert (toBeEmpty)
Empty assert (toBeEmpty)
Expect assertion: the Target has no text or value.
Step model
action_name | toBeEmpty |
| Group | Expect |
| Target | Required |
| Value | Unused |
| expected_value | Unused |
| TEST_ACCOUNT | Forbidden |
| Do not confuse with | toHaveValue, clear |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- Target is a field or an element with text.
Steps
- Add a
toBeEmptystep. - Set Target.
- Leave Value empty.
- Save.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
Empty search
Fields in the UI:
| Field | Value |
|---|---|
action_name | toBeEmpty |
| Target | kind LABEL, value Search |
Step JSON fragment (copy-paste):
json
{
"action_name": "toBeEmpty",
"target": {
"kind": "LABEL",
"value": "Search"
}
}Common mistakes
- An empty field and a field of spaces are not the same thing on the page.
Screenshots
Screenshots of the step form for toBeEmpty will be added here in a later pass.
Did this page help?