Variable assertions

This guide provides an overview of how to create a variable assertion. Some use cases for variable assertions include:

📘

Using variables as expected values

If you are looking for information on how to assert element properties or attribute values against the values that can come from a variable, see the documentation on element assertions.

Creating a variable assertion

  1. In the mabl Trainer window, click on the check mark icon to add an assertion.
  2. Select Variable in the Trainer window.
  3. Configure the assertion in the variable assertion menu.
  4. Click OK.
Configuring a variable assertion

Configuring a variable assertion

Configuring a variable assertion

The variable assertion menu is where you define the criteria of your assertion. These are the settings:

  • Variable: When you choose a variable from the dropdown, its expected value is displayed.
  • Assertion type: Choose an assertion type. Supported assertion types for variables include:
    • Equals
    • Does not equal
    • Contains
    • Does not contain
    • Starts with
    • Does not start with
    • Ends with
    • Does not end with
    • Greater than
    • Less than
    • Greater than or equals
    • Less than or equals