Assert Title
Assert that the page title matches the given one.
Parameters
title
The text to match (see Content Pattern for a detailed description).
It is possible to use the '*' and the '?' character as wildcards; '*' matches zero or many characters; '?' matches one single character.
It is also possible to define a comma separated list of words (with '*' and '?' if needed). Then this command checks, that the words in the defined order are parts of the page title.
You can also check the title of PDF documents.
It is possible to use the '*' and the '?' character as wildcards; '*' matches zero or many characters; '?' matches one single character.
It is also possible to define a comma separated list of words (with '*' and '?' if needed). Then this command checks, that the words in the defined order are parts of the page title.
You can also check the title of PDF documents.
wait
The (optional) timeout in seconds used for waiting for javascript events.
This is helpful for pages working with setTimeout javascript command or doing some AJAX polling for e.g. search results.
Examples
Check the whole title
Check for the whole title.
Command | Parameter | Optional Parameter | |
---|---|---|---|
open-url | commands/openurl.html | ||
assert-title | WETATOR / Open Url |
Check for title using wildcards
Check for title using wildcards.
Command | Parameter | Optional Parameter | |
---|---|---|---|
open-url | commands/openurl.html | ||
assert-title | W*R / Open* |
Check for title of a PDF document
Every PDF document holds some metadata including the author and the title. Usually this fields are filled.
The command 'assert-title' is able to check the title from these metadata.
Not all browsers are using this title for the tab/window title if the PDF document is displayed inline. But checking
the title might helpful, if your document contains only graphics (e.g. scans) and therefore assert-content is not possible.
Command | Parameter | Optional Parameter | |
---|---|---|---|
open-url | download/wetator_overview.pdf | ||
assert-title | WETATOR / Smart web application testing |