Assertions against the page
  • 11 Mar 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Assertions against the page

  • Dark
    Light

Article Summary

1. Assertions on page titles

A page title is a string of characters set in the title tag.

It is displayed in tabs and window sections and is used as a name when bookmarking.

KeywordDescription
Title Should BeVerify that the page title exactly matches the specified string

If you need a partial match command for a title, please contact our support team.

2. Assertions on page URLs

KeywordDescription
Location Should BeVerify that the current URL exactly matches the specified string
Location Should ContainVerify that the current URL contains the specified string

If you want to validate the URL of a page where the URL changes dynamically, we recommend using Location Should Contain.

3. Assertions on all text contained in the page

KeywordDescription
Page Should Not ContainVerify that the specified string does not exist in the page
Elements not subject to this assertion

If any of display: none;, visibility: hidden; or opacity: 0; properties are set to elements, those elements are treated as if they are not on the page and are not subject to this assertion.

4. Assertions on all HTML elements on the page

Currently, Page Should Contain Element is shown as a command for assertions on the page (click the "Assert against page" button), but in the future, it will be a command for assertions on elements within the page.

KeywordDescription
Page Should Contain ElementVerify that certain elements are present on the page

Even if the element is not visible to the general public, it will be considered successful if it exists as an HTML element. For more information, please refer to "Frequently Asked Questions about Assertions".


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.