Then the "item" checkbox should not be checked

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

This is the negative selector first, modal phrasing using should not be checked. It behaves identically to Then the "selector" checkbox is not checked. The should not wording fits well in BDD scenarios where the goal is to express expectations in natural obligation language. The two forms (should not and is not) can be mixed freely within the same scenario.

Accepted phrasings

Then the "<selector>" checkbox should not be checked
And the "<selector>" checkbox should not be checked

Examples

Then the "#newsletter" checkbox should not be checked
And the ".terms" checkbox should not be checked
Then the "#remember" checkbox should not be checked
And the "[data-testid=opt-in]" checkbox should not be checked

In a real scenario

Scenario: Unchecking persistent login saves correctly
  Given I am logged in as "admin@example.org"
    And I go to "/admin/config/system/login-settings"
    And wait
  Then I should see "Login settings"
  When I uncheck the checkbox "#edit-persistent-login"
    And I press "Save configuration"
    And wait
  Then I should see "Configuration saved."
    And the "#edit-persistent-login" checkbox should not be checked

Related steps

Back to Field Steps