Then I should not see text matching "text pattern"

This step definition is used to test whether the current page does not contain text that matches the specified pattern.

 

Then (I|we)* should not see text matching "([^"]*)?"

 

There are many types of text that are searched such as email, phone number, link address path, time and date, uppercase or lowercase words, words with certain letters, and . . . etc.

 

Example:

Then I should not see text matching "^O\w+"

"^O\w+" It is a pattern that searches for any text beginning with the capital letter "O".