Then the response should contain "text in the page"

This step definition is used to verify that the HTML response must contain a specific text.

Then the response should contain "([^"]*)?"

Define a step to asserting that the HTML response contains a specific text, not necessary to see it.

 

Example:

Then the response should contain "Welcome visitor, How can I help you?"