Specifying the expected page title

Page title verification points verify that the primary request for a page returns the expected page title. If the returned title is unexpected, the test log reports a failed verdict event. Although the comparison is case-sensitive, it ignores multiple white-space characters (such as spaces, tabs, and carriage returns).

Procedure

  1. In the Test Navigator, browse to the test and double-click it.
    The test opens.
  2. Right-click the test name or a page, and select Enable Page Title VPs.
    Your choice determines whether the verification point is added to all pages in the test or to one page.
  3. Click the page title to display the editing fields in the Test Element Details area.
    Page Title Verification Point section
  4. Ensure that the Expected page title field shows the string that you expect to be included in the response. Although you can change the string, the value listed is what was returned between the <title></title> tags during recording.

What to do next

You can also change the preferences so that Page Title verification points are set automatically. To do this:
  1. Change the HTML page title. Click Window > Preferences > Test > Test Generation > HTTP Test Generation > Verification Points, and select HTML Page Title. This changes subsequent tests that you record.
  2. Optionally, regenerate existing tests with the changed preference, as shown in Generating a new test from a recorded session.