Assert Contains Text

As the name suggests, assert contains text checks for a string in the target element and logs success or failure.

It will log the step details if the assertion passes else it logs as a failure if the expected string or reg-ex is not part of the text content of a given element with a proper explanation and stops the script playback.

Note: Do not use this in an if condition as it does not return any value, and throws an exception if the assertion fails.

The example below and Usage:

The accessor column shows the HTML DOM Element of the web page.

The value column shows the Expected String, Regular expressions can also be used.