> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequentum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test

> Evaluate a condition and optionally log custom success or failure messages.

The Test command checks whether a condition is true and returns an error when it is false. It can also log an error message for a false result or an optional message for a true result. Located under **Action** in the command palette.

## Selected test content

* **When missing:** Specifies what happens if the selected test content is missing. The default is **Warn**.
  * **Fail:** Generates an error in the logs and fails the Agent.
  * **Warn:** Generates a warning in the logs and continues the Agent.
  * **Ignore:** Skips child commands and moves to the next command.
* **When hidden or disabled:** Controls selection based on whether an element is visible and enabled.
  * **Select:** Selects visible and disabled elements that match the XPath.
  * **Ignore:** Selects only elements that are present and enabled—that is, elements that match the XPath and are interactive.
* **Selected test content:** Displays the selected test content as non-editable HTML so that you can inspect the selected test element.

## Test settings

1. **Assert selected content:** Defines the condition to evaluate. The available conditions test for existence, equality, pattern matching, containment, or comparison.
   1. **Exists:** Returns true if the selection exists on the page.
   2. **Exists And Not Empty:** Returns true if the selection exists and is not empty.
   3. **Not Exists:** Returns true if the selection does not exist.
   4. **Not Exists Or Empty:** Returns true if the selection does not exist or is empty.
   5. **Equals:** Returns true if the value in the selection equals the passed value.
   6. **Not Equals:** Returns true if the value in the selection does not equal the passed value.
   7. **Matches:** Returns true if the passed value matches the value in the selection, based on a pattern or exact match.
   8. **Not Matches:** Returns true if the passed value does not match the value in the selection.
   9. **Contains:** Returns true if the passed value contains the value in the selection.
   10. **Not Contains:** Returns true if the passed value does not contain the value in the selection.
   11. **Starts With:** Returns true if the passed value starts with the value in the selection.
   12. **Not Starts With:** Returns true if the passed value does not start with the value in the selection.
   13. **Ends With:** Returns true if the passed value ends with the value in the selection.
   14. **Not Ends With:** Returns true if the passed value does not end with the value in the selection.
   15. **Greater Than:** Returns true if the passed value is greater than the value in the selection; use this for numerical comparisons.
   16. **Greater Than Or Equals:** Returns true if the passed value is greater than or equal to the value in the selection.
   17. **Less Than:** Returns true if the passed value is less than the value in the selection; use this for numerical comparisons.
   18. **Less Than Or Equals:** Returns true if the passed value is less than or equal to the value in the selection.
2. **Exit on Failure:** Determines whether the Agent fails when the condition is not met.
3. **Custom Failure Message:** Specifies an optional message to print when the condition fails.
4. **Report Success:** Prints a success message when the condition is met.
5. **Custom Success Message:** Specifies an optional message to display when the condition succeeds.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.