Then the "item" checkbox is not checked

This step asserts that a specific checkbox is not checked. The selector parameter is a CSS selector string - such as #newsletter, .terms, or [name=marketing] - that identifies the checkbox on the page. The step calls Playwright's isChecked() and fails with a clear error message if the checkbox is found to be checked when it should not be.

This is the negative form of the selector first, present tense phrasing family. It is equivalent to using Then the "selector" checkbox is not checked - the step is documented separately to make it easy to locate the not-checked variant in search results. Use it after an action that should have unchecked a box, or to confirm a box is off by default when the page loads.

Accepted phrasings

Then the "<selector>" checkbox is not checked
And the "<selector>" checkbox is not checked

Examples

Then the "#newsletter" checkbox is not checked
And the "#marketing-opt-in" checkbox is not checked
Then the ".terms" checkbox is not checked
And the "[name=analytics]" checkbox is not checked

In a real scenario

Scenario: Optional notifications are off by default for new accounts
  Given I am logged in as "newuser@example.org"
    And I go to "/account/settings"
  Then I should see "Notification preferences"
    And the "#promo-emails" checkbox is not checked
    And the "#partner-offers" checkbox is not checked
    And the "#sms-alerts" checkbox is not checked

Related steps

Back to Field Steps