In the Scriptless Automation Framework, the VALIDATION field is essential for specifying the expected outcomes or values against which the state or properties of web elements are checked during automation tests. This field is effectively paired with VALIDATION_TYPE to enable various forms of validation checks.
Role of the VALIDATION Field
Purpose: The VALIDATION field is used to define the expected result or benchmark for comparison during the validation of web elements.
Versatility: Its usage varies depending on the chosen VALIDATION_TYPE, catering to a wide range of validation scenarios.
Interaction with VALIDATION_TYPE
The VALIDATION_TYPE dictates how the VALIDATION field is employed:
EQUAL_IGNORE
Compares the web element's text with the value in VALIDATION, ignoring case differences.
Compares an attribute's value against the VALIDATION field value, ignoring case. VALIDATION should follow the template attributeExpected|attributeProperty.
Ensures the attribute's value contains the substring provided in the VALIDATION field.VALIDATION should follow the template attributeExpected|attributeProperty.
Custom validation logic may vary in its use of the VALIDATION field.
CSS_PROPERTY
Added a feature for validating CSS property types, enabling users to ensure UI components match expected CSS values accurately. VALIDATION should follow the template "cssExpected | CssPropertyName".
Example: To validate the font-family of a page title in SwagLabs, the syntax would be: