This step asserts that a given string of text is not present anywhere in the <body> of the current page. It waits up to five seconds for the text to go (since 2.0.12), so it also holds right after an action that removes the text.
The check reads the page text the same way as the positive form: letter case is ignored, runs of white space are collapsed, and the text of hidden elements counts, but not the text of <script>, <noscript> or <style>; the value of a field, the text of an image and the content of an iframe are not page text. So on a page that reads "Next page", I should not see "next page" fails. For the text a visitor can see, use I wait for the text "text" to disappear. Both I and we are accepted as the subject. If the text is found, the step fails with a message indicating what was found and that it should not have been there. For the waiting positive counterpart, see Then I should see.
Accepted phrasings
Then I should not see "text"
Then we should not see "text"
And I should not see "text"
And we should not see "text"
Examples
Then I should not see "Access denied"
Then we should not see "Edit layout"
And I should not see "Create new account"
And I should not see "You are not authorized"
In a real scenario
Scenario: Check that create new account option does not appear for anonymous users
Given I am an anonymous user
When I go to "/user"
And wait
Then I should not see "Create new account"