> For the complete documentation index, see [llms.txt](https://docs.precisiontestautomation.in/scriptlessautomation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.precisiontestautomation.in/scriptlessautomation/automation-platforms/scriptlessweb-automation/automationasserts.md).

# AutomationAsserts

In our testing framework, `AutomationAsserts` is a key component that provides various methods for asserting conditions in tests. These methods are used to verify that the application behaves as expected. Below is an explanation of each type of assertion available through `AutomationAsserts`, referenced against various validation types:

1. **Exact Text Comparison**
   * **Assertion**: `assertEquals`
   * **Use**: Validates that the actual text obtained from the application matches exactly with the expected text.
   * **Reference**: Often used in scenarios marked as `EQUAL` in validation types.
2. **Boolean Condition Validation**
   * **Assertions**: `assertTrue` for positive conditions, `assertFalse` for negative conditions.
   * **Use**: Checks if a condition (like an element being visible or a button being enabled) is true or false.
   * **Reference**: Tied to validation types like `IS_DISPLAY`, `IS_BUTTON_ENABLE`, and `IS_BUTTON_DISABLE`.
3. **Non-Matching Text Check**
   * **Assertion**: `assertNotEquals`
   * **Use**: Ensures that two pieces of text are not the same, verifying that certain text changes under different conditions.
   * **Reference**: Related to `ATTRIBUTE_VALUE_NOT_PRESENT` validation type.
4. **Case-Insensitive Text Comparison**
   * **Assertion**: `assertEqualsIgnore`
   * **Use**: Compares two texts for equality, disregarding any case differences (upper or lower case).
   * **Reference**: Used for validation types like `EQUAL_IGNORE` and `ATTRIBUTE_EQUAL_IGNORE`.
5. **Attribute Value Verification**
   * **Use**: Involves assertions that check if an element's attribute has a specific value or state.
   * **Reference**: Linked to validation types such as `ATTRIBUTE_VALUE_PRESENT` and `ATTRIBUTE_VALUE_NOT_PRESENT`.
6. **Custom Checks**
   * **Use**: Allows for implementing custom validation methods that are not covered by standard assertions.
   * **Reference**: Corresponds to the `CUSTOM` validation type.
7. **Information Logging**
   * **Assertion**: `info`
   * **Use**: This method is used for logging informational messages in the test report, not for validation.
   * **Reference**: Used across various validation types for adding context or details in the report.

Understanding and effectively using these `AutomationAsserts` methods in conjunction with the designated validation types is crucial for creating thorough and reliable automated tests. They ensure that each test step not only executes as intended but also accurately verifies the expected outcomes.
