When you define a test using the mabl trainer, you can include assertions that describe logic that mabl should use to confirm that your application is in a correct state at a specified step in a test run. Not only can you compare elements on the page to hardcoded text or values, but you can also compare against variables and various attributes. If you have questions regarding how to add and use variables, you can find the information in the Using variables document.
Currently, mabl supports the following assertion types against a variable where the innerText or other property of the selected element:
- Does not equal
- 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
- In the mabl trainer window, click "Add assertion."
- Click on the element that you want to include in your assertion.
- Choose your assertion type from the drop-down.
- Choose your desired element attribute/property, including custom attributes.
- Select the "Variable" radio button under the "Compare to" section.
- Select the variable you'd like to compare to.
- Click "OK"
- Continue with your training session, if applicable.
Updated about 12 hours ago