Field Steps

Field state assertions across all input types. Value, checked, selected, label. The verifications QA repeats most.

Step phrasings in this group

The book sidebar lists each individual step page under this group.

Then the field "username" should be empty

Assert a field's current value is the empty string.

Then the field "username" should not be empty

Assert a field has a non-empty value.

Then the field "username" should exist

Assert a field exists in the DOM (any state).

Then the field "missing-field" should not exist

Assert a field does NOT exist in the DOM.

Then the field "username" should have "enabled" state

Assert a field's enabled / disabled state.

Then the field "username" should be required

Assert a field has the required or aria-required="true" attribute.

Then the field "bio" should not be required

Assert a field is NOT required.

When I fill in the multi-value field "tags" with the following values:

Fill a multi-value form field (e.g. name[] array inputs) from a table.

When I fill in the color field "favorite" with the value "#ff0000"

Fill an <input type="color"> field with a hex value.

Then the color field "favorite" should have the value "#ff0000"

Assert an <input type="color"> field's current value (case-insensitive).

When I fill in the WYSIWYG field "body" with the "Hello world"

Fill a CKEditor / contenteditable rich-text field with HTML.

Then the option "Mercedes" should exist within the select element "#cars"

Assert a <select> contains an option with the given visible text.

Then the option "Manager" should not exist within the select element "#role"

Assert a <select> does NOT contain an option with the given text.

Then the option "Mercedes" should be selected within the select element "#cars"

Assert an option is currently selected in a <select>.

Then the option "Admin" should not be selected within the select element "#role"

Assert an option is NOT currently selected in a <select>.

When I unselect "Red" from "#colors"

Unselect a single option from a <select multiple>.

When I clear the select "#colors"

Clear all selections in a <select multiple>.

When I check the checkbox "#agree"

Check a CSS-addressed checkbox.

When I uncheck the checkbox "#newsletter"

Uncheck a CSS-addressed checkbox.

When I choose the radio button "#gender-male"

Select a CSS-addressed radio button.

When I fill in the field "#username" with "alice"

Fill a CSS-addressed input/textarea with a value.

Given browser validation for the form "#signup" is disabled

Disable native browser validation on a form (sets novalidate).

When I fill in the datetime field "Start" with date "2026-05-08" and time "10:00"

Fill paired <input type=date> + <input type=time> controls for a label.

When I fill in the date part of the datetime field "Start" with "2026-05-08"

Fill only the date component of a paired datetime field.

When I fill in the time part of the datetime field "Start" with "10:00"

Fill only the time component of a paired datetime field.

When I fill in the start datetime field "Event" with date "2026-05-08" and time "10:00"

Fill the start half of a date-range pair.

When I fill in the end datetime field "Event" with date "2026-05-09" and time "18:00"

Fill the end half of a date-range pair.

Back to all step groups