Webtest WebTest GitHub Home

Core Step verifyTitle

Description

This step verifies whether the text enclosed by the HTML title tag (<TITLE> ... </TITLE>) matches some specified text. The specified text can represent a regular expression.

Parameters

text
Required? yes
The text value to verify against.
description
Required? no
The description of this test step.
regex
Required? no, default is 'false'
Specifies whether the text value represents a regular expression.

Inline Text

The inline text is all the text between the start tag ( <verifyTitle> ) and the end tag ( </verifyTitle> ), including blanks, tabs or newlines. Using a pair of start/end tags ( <verifyTitle> </verifyTitle> ) has not the same behavior than the seemingly equivalent empty element tag ( <verifyTitle/> ).

Required? no
Alternative way to set the 'text' attribute.

Details

verifyTitle example
<webtest name="Verify user name in document title">
  <config ... />
  <steps>
    <invoke ... />
    <verifyTitle description="Title can include variable user name"
      text="User .* - Main View"
      regex="true" />
    ...
  </steps>
</webtest>