> 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/web-automation-key-phrases/validation_type.md).

# VALIDATION\_TYPE

`VALIDATION_TYPE` is a pivotal element in the Scriptless Automation Framework, directing how a web element's state or property is to be validated during test execution. This field categorizes the kind of validation to be performed, working in conjunction with the `VALIDATION` field to ascertain the accuracy of web elements against predefined criteria.

**Types of VALIDATION\_TYPE**

Each `VALIDATION_TYPE` serves a specific purpose in the validation process:

1. **EQUAL\_IGNORE**: Validates that the text of the web element matches the specified value in the `VALIDATION` field, disregarding case sensitivity.
2. **IS\_DISPLAY**: Checks whether the web element is currently visible or displayed on the web page. It does not require a corresponding value in the `VALIDATION` field.
3. **IS\_BUTTON\_ENABLE**: Assesses if a button element is enabled, implying it is interactive and can be clicked.
4. **IS\_BUTTON\_DISABLE**: Verifies that a button element is disabled, meaning it should not be interactive or clickable.
5. **ATTRIBUTE\_VALUE\_PRESENT**: Ensures that the web element contains a value. This is particularly useful for checking if elements have certain properties or states defined.
6. **ATTRIBUTE\_VALUE\_NOT\_PRESENT**: Opposite to the above, this checks that the web element does not hold any value.
7. **ATTRIBUTE\_EQUAL\_IGNORE**: Similar to `EQUAL_IGNORE`, it compares the value of a specified attribute of the web element to the value in the `VALIDATION` field, ignoring case differences.
8. **CUSTOM**: Allows the use of custom validation methods. The specifics of how this type interacts with the `VALIDATION` field depend on the custom logic implemented.
9. **NONE**: Indicates that no validation is to be performed for the web element. In this case, the `VALIDATION` field is not applicable.
10. **CSS\_PROPERTY:** Validating CSS property types, enabling users to ensure UI components match expected CSS values accurately.
11. <mark style="background-color:green;">**PAGE\_COMPARISON**</mark><mark style="background-color:green;">:Validate the screenshot taken from the driver against the expected screenshot.</mark>
12. **IS\_NOT\_DISPLAY:** Ensure that an element is not displayed on the page.
13. **IS\_ELEMENT\_PRESENT:** Verify the presence of an element in the DOM.
14. **IS\_ELEMENT\_NOT\_PRESENT:** Ensure that an element is not present in the DOM.

**Usage in Test Execution**

* The choice of `VALIDATION_TYPE` guides the testing framework on what kind of assertion or check to perform on a web element.
* It enhances test scripts' flexibility, allowing for a broad spectrum of validation scenarios without writing complex code.

**Example**

* Setting `VALIDATION_TYPE` to `IS_DISPLAY` instructs the framework to check if a particular web element is visible on the webpage, without needing to compare it to any specific value.
* When `VALIDATION_TYPE` is `EQUAL_IGNORE`, the framework compares the text of the web element with the expected value provided in the `VALIDATION` field, in a case-insensitive manner.

The `VALIDATION_TYPE` field in the Scriptless Automation Framework simplifies the process of defining various validation conditions, contributing to more robust and reliable automated testing.

{% hint style="info" %}
Points marked with green background are part of license code.
{% endhint %}
