How-to
Page title assert (toHaveTitle)
Page title assert (toHaveTitle)
Expect assertion: the tab title equals Value. Target is not used.
Step model
action_name | toHaveTitle |
| Group | Expect |
| Target | Unused |
| Value | Required (title) |
| expected_value | Unused |
| TEST_ACCOUNT | Allowed |
| Do not confuse with | toHaveURL, toHaveText |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- The page is already open in the worker tab.
Steps
- Add a
toHaveTitlestep. - Leave Target empty.
- Enter the tab title in Value.
- Save.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
Cart title
Fields in the UI:
| Field | Value |
|---|---|
action_name | toHaveTitle |
| Target | empty |
| Value | Cart |
| value_source_type | INLINE |
Step JSON fragment (copy-paste):
json
{
"action_name": "toHaveTitle",
"value_text": "Cart",
"value_source_type": "INLINE"
}Common mistakes
- This is the tab title, not a heading on the page. For an on-page heading, set a Target and use
toHaveText.
Screenshots
Screenshots of the step form for toHaveTitle will be added here in a later pass.
Did this page help?