Skip to main content

Adding Validations

Achieve complex verifications on your website with Low Code Automation Validations.

In this guide, we will explore the three essential validation methods offered by Low Code Automation, designed to streamline the validation process for your automated tests. With Low Code Automation, you can effortlessly ensure the accuracy and reliability of your workflows without the need for extensive coding expertise. It provides the following three validation methods:

Visual Validation

Visual Validation is a powerful feature that allows you to confirm the correctness of elements, ensuring they appear as expected. It helps identify discrepancies in the visual presentation of your web application, such as layout issues, color changes, or missing elements.

With Low Code Automation, you can perform visual validation on specific elements. This helps ensure the accuracy and consistency of critical elements without verifying the entire page. It also ensures that changes or updates to other parts of the page do not affect the validation results for unrelated elements, thereby improving test stability.

How to add Visual Validations

While you record a test, you can add visual validations to specific elements to ensure they appear as expected.

To perform visual validation on specific elements:

  1. While recording, click Visual Validation.
  2. You can perform the following actions:
    • Hover over the screen and choose the element to validate. You can also use UP or DOWN arrow keys to select a more appropriate element.
    • You can also add more visual validations for other steps as needed.
  3. If needed, you can set acceptable variations between expected and actual screenshots for visual validation. You can do that by using the Difference Threshold slider in the step details section. Learn more.
  4. Click Save recording.

Visual validation works best when added for a specific element on the page. Using this feature to validate full page screenshots is not recommended.

Visual Validation

Replay of Visual Validation

Low Code Automation uses Percy’s visual diff engine to compare new screenshots with the baseline. During recording, Low Code Automation captures the screenshot of the element where the visual validation is added and uses it as baseline to compare it with screenshots taken during execution for the same element.

When the test gets executed, you can click Compare Screenshots to view and compare the baseline and captured screenshots. You can compare them using the following views:

  • Side-by-side: Displays the Baseline (expected) and Captured (actual) screenshots side by side and the percentages for observed difference and set threshold.
  • Overlay: Shows the Baseline (expected) and Captured (actual) screenshots layered on top of each other for comparison.

Replay Visual Validation

Difference Threshold

The Difference Threshold feature lets you specify the acceptable difference between expected and actual screenshots for visual validations. You can adjust the threshold for each visual validation step. The default threshold is 10% and the minimum is 0%.

Until a cloud run is successful for the test, the difference in threshold is set higher at 40% to establish the baseline for cloud. This is required to accomodate for variations in environment and browser changes. Once the baseline is established for cloud, subsequent runs would use the appropriate threshold configured at the step level.

Difference Threshold

Text Validation

Text Validation is a key feature that provides a user-friendly and efficient way to verify the accuracy and consistency of text content on your websites.

With Low Code Automation, you can even perform advanced checks on text content, such as:

  • Check for Equality of text content
  • Check for text Contains some string
  • Check for text content Starts with string

Text Validation

Element Presence Validation

Element Presence Validation complements visual and text validation by addressing scenarios where the presence or absence of elements is crucial for your application’s functionality, user experience, and stability.

It provides the following two options:

  • Validate element present: Ensures that a specific element is visible on the page when it should be. It is useful to confirm essential components on the webpage are available and functioning as expected. If the element is not present when it should be, the test fails for that step. For example, verify the Submit button is present after entering credentials to enable login. You can also use Element Presence Validation to wait for a particular element before recording any actions. More best practices for Validations can be found here.
  • Validate element not present: Ensures that an element is not visible on the page when it should be hidden. It is useful to verify elements are properly removed or hidden in response to user actions. If the element is still visible when it should be absent, the test fails for that step. For example, ensure that filters applied on the eCommerce website are not present after removing them.

Element Present

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy