Page Assertions

Learn how to assert a page using Selenium.

Page Assertions

Without assertions (often known as checks), a test script is incomplete. Common assertions for testing web applications are:

  • Page title (equals)
  • Page text (contains or does not contain)
  • Page source (contains or does not contain)
  • Input element value (equals)
  • Display element text (equals)
  • Element state (selected, disabled, and displayed)

Get hands-on with 1200+ tech skills courses.