The "contains" and "does not contain" Assertion Types

📘

Important information about creating an assertion

Assertions can only be added when creating a test, see Defining a test with the mabl trainer and Including assertions in your test for more information.

Many times, you'd like to find whether or not an element in your application or website contains a certain element, word, or number instead of something exact. The "contains" and "does not contain" assertion types make that easy.

Using the "contains" Assertion

  1. Click the "Add Assertion" link in the mabl trainer.
  2. Click on the element that you want to include in your assertion.
  3. Examine the "Assertion type," which will be "equals" by default.
  4. Click the dropdown menu and change the type to "contains," examining the result.
  1. Add to or edit the Expected Value box, if applicable.
  2. Click "Save".
  3. Continue with your training session, if applicable.

Using the "does not contain" assertion"

  1. Click the dropdown menu and change the type to "does not contain," examining the result.
  2. Add to or edit the text box, if applicable.
  3. Click "Save".
  1. Continue with your training session, if applicable.

Did this page help you?