Visual analysis

Perfecto Visual Analysis provides tools for validating and interacting with application UI based on what is visually displayed on the screen. Use Visual Analysis when object-based identification is not possible or reliable, such as with:

  • System dialogs

  • Browser UI elements

  • Content rendered without stable DOM identifiers

  • Visual-only validation scenarios

Visual Analysis works by analyzing screenshots of the device or browser display and identifying text (using OCR) or images that match specified criteria.

What Visual Analysis supports

Visual Analysis supports the following capabilities:

  • OCR-based text recognition) to locate visible text on the screen

  • Text-based interaction with UI elements associated with recognized text

  • Visual validation of expected text content

  • Optional scrolling to locate text beyond the visible viewport

Available for mobile devices and desktop web browsers, with important platform‑specific limitations described in the following sections.

Platform support and limitations

Visual Analysis support varies by platform, operating system, and browser.

Mobile devices (Android and iOS)

On mobile devices, Visual Analysis supports:

  • Text recognition and validation

  • Text‑based interaction (for example, click and set text)

  • Screenshot capture from either the native screen or the video feed

Mobile devices support the full set of Visual Analysis parameters, including source=camera.

Desktop web browsers

Visual Analysis support for desktop web depends on the operating system and browser.

Windows desktop browsers

On Windows desktop browsers:

  • Text analysis (OCR) is supported

  • Visual Analysis commands can be used for text validation and interaction

  • Screenshot capture uses the desktop browser rendering

macOS desktop browsers

Visual Analysis is not supported on macOS when using Safari. Due to Apple and Safari technical limitations, OCR commands may fail at runtime, including failures to capture screenshots. This behavior is imposed by Apple/Safari and cannot be configured or worked around.

As a result, none of the Visual Analysis services are supported on macOS Safari desktop web, including all OCR‑based commands, regardless of parameters used.

This behavior is imposed by Apple/Safari and cannot be configured or worked around within Perfecto

If your test scenarios require Visual Analysis on desktop web, use one of the following:

  • A non‑Safari browser on macOS

  • A Windows desktop browser

Supported Visual Analysis commands (desktop web)

When Visual Analysis is supported on desktop web (for example, Windows desktop browsers or non‑Safari browsers on macOS), desktop web testing supports text analysis only.

Although these commands use the mobile: prefix, they are also used for OCR‑based text analysis on supported desktop web browsers.

The following commands are supported:

These commands are not supported on macOS desktop web when using Safari.

Screenshot source parameter (source)

Visual Analysis commands support the source parameter to control how screenshots are captured:

  • source=camera captures screenshots from the device camera or video feed. This option is intended for mobile devices only.

Desktop web machines (including macOS and Windows) do not support camera-based capture and cannot use the source=camera option.

Also in this section