Link

the “__” element should contain “__”

Verifies that an element matched by the selector, ID, name, or label contains the specified text.

Pattern

^(?|the )"([^"]*)" (?|element )should contain "([^"]*)"$

Parameters

Position Description Value Type Restrictions
1 field field id/name/label/selector  
2 value string/variables  

Examples

Given I am on the "home" page
Then the "HomeCenterMessage" element should contain "We have listed most of the components that are used by developers to build web applications."