Then the "item" checkbox

This page is the index for the checkbox assertion family in the field-steps group. Webship-js provides four distinct phrasings for asserting the checked or unchecked state of a checkbox, allowing you to choose the wording that best fits your scenario's natural language. All four phrasings take the checkbox as a CSS selector (#privacy-policy, input[name=newsletter]) or as the exact text of its label, its name, its id or its value (since 2.0.12).

The four child steps cover two structural variations: selector first (the "#selector" checkbox ... form) and keyword first (the checkbox "#selector" ... form), and within each variation there is a should be form and an is form. Both variations and both tense forms produce identical assertion behavior - they look for the checkbox for up to 5 seconds, read its state and fail with The checkbox "…" is not checked. or … is checked, but it should not be. when it does not match; a checkbox that is not found fails with what was looked for, the page and a hint.

Child steps

Related steps

Back to Field Steps