AI Vision Validate

The Artifical Intelligence Vision Validate block automates the validation of visual elements within an application interface, ensuring that key UI components are correctly displayed across different screens, environments, and devices.

It can be used to confirm the presence of UI elements (e.g., buttons, labels, forms) or detect discrepancies when expected elements are missing or incorrectly rendered.

image-20260207-125342.png

Notes:

  • The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

  • To use this block, cloud blocks must be activated for your tenant in the add-ons section of Customer Portal. Make sure this is enabled before adding the block to your flows.

  • AI accuracy is not guaranteed, as it relies on probabilities and the daily performance of OpenAI’s technology. Occasional inaccuracies may occur due to inherent limitations of the technology. For more details, please refer to OpenAI’s documentation.

Quick-start

  1. Drag AI Vision Validate onto the canvas.

  2. Choose a Source type (Image File or Local Path).

  3. Provide an image in File Input (supported formats: .png, .jpg, .jpeg, .webp, .gif).

  4. Enter an Action Prompt describing what UI elements should be validated (e.g., “Check if the login button is visible”).

  5. Connect the green input and output connectors (and optionally Not Valid and Failed for branching).

  6. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector triggers the block to start executing. The green output connector triggers when the block execution is complete. The block title (“AI Vision Validate”) can be renamed by double-clicking it and typing in a new title.

  • File Input: Lets the block connect to the File Output of other blocks, supporting image-processing workflows where an upstream block provides the image.

  • Source Type: Selects where the image comes from:

    • Image File: The image is uploaded and saved inside Leapwork.

    • Local Path: The image is referenced from a specified path without being uploaded.

  • Action Prompt: The validation criteria. Use this field to describe what the block should look for in the image (for example verifying a button is present, a specific label is visible, or a UI component is rendered correctly).

  • Reason: Provides feedback on the validation result. If validation succeeds, it confirms the expected UI elements were found. If validation fails, it explains what was expected versus what was detected (for example “Button missing on checkout page”).

  • Not Valid: Triggers when the validation cannot be completed successfully (for example due to poor image quality, ambiguous UI components, or unsupported formats).

  • Default timeout: Controls whether the block uses the flow’s default timeout or a fixed timeout. If the checkbox is not selected, the timeout is 30 seconds. If the checkbox is selected, the Default timeout value from the flow settings applies.

  • Timeout: The maximum time spent validating before giving up and triggering Not Valid. This is separate from the case global timeout in Settings, which can cancel a run if the whole case exceeds it.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.

Customer Portal Add-ons

Customer portal section to activate your cloud blocks.

Guidelines for using AI blocks

Common guidelines for prompting, generating, validating, extracting, and transforming AI-driven test data in Leapwork’s AI Blocks.