How-to
Disabled assert (toBeDisabled)
Disabled assert (toBeDisabled)
Expect assertion: Target is disabled.
Step model
action_name | toBeDisabled |
| Group | Expect |
| Target | Required |
| Value | Unused |
| expected_value | Unused |
| TEST_ACCOUNT | Forbidden |
| Do not confuse with | toBeEnabled, toBeHidden |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- Target is a control that can be disabled.
Steps
- Add a
toBeDisabledstep. - Set Target.
- Leave Value empty.
- Save.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
Save button is disabled
Fields in the UI:
| Field | Value |
|---|---|
action_name | toBeDisabled |
| Target | kind ROLE, value button, name Save |
Step JSON fragment (copy-paste):
json
{
"action_name": "toBeDisabled",
"target": {
"kind": "ROLE",
"value": "button",
"name": "Save"
}
}Common mistakes
- Do not confuse a disabled button with a hidden one. Use
toBeHiddenfor hidden.
Screenshots
Screenshots of the step form for toBeDisabled will be added here in a later pass.
Did this page help?