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:
EQUAL_IGNORE: Validates that the text of the web element matches the specified value in the
VALIDATION
field, disregarding case sensitivity.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.IS_BUTTON_ENABLE: Assesses if a button element is enabled, implying it is interactive and can be clicked.
IS_BUTTON_DISABLE: Verifies that a button element is disabled, meaning it should not be interactive or clickable.
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.
ATTRIBUTE_VALUE_NOT_PRESENT: Opposite to the above, this checks that the web element does not hold any value.
ATTRIBUTE_EQUAL_IGNORE: Similar to
EQUAL_IGNORE
, it compares the value of a specified attribute of the web element to the value in theVALIDATION
field, ignoring case differences.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.NONE: Indicates that no validation is to be performed for the web element. In this case, the
VALIDATION
field is not applicable.CSS_PROPERTY: Validating CSS property types, enabling users to ensure UI components match expected CSS values accurately.
PAGE_COMPARISON:Validate the screenshot taken from the driver against the expected screenshot.
IS_NOT_DISPLAY: Ensure that an element is not displayed on the page.
IS_ELEMENT_PRESENT: Verify the presence of an element in the DOM.
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
toIS_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
isEQUAL_IGNORE
, the framework compares the text of the web element with the expected value provided in theVALIDATION
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.
Last updated
Was this helpful?