Skip to main content

Overview

Parse the screen with OmniParser v2 to find all visible UI elements. TestDriver returns structured data. This includes element types, text content, interactivity levels, and bounding box coordinates. This method examines all of the screen and returns each element that it finds. Use it for these:
  • To understand the full UI layout of a screen
  • To find all clickable or interactive elements
  • To build custom element logic
  • To debug which elements TestDriver can find
  • To do an accessibility audit
Availability: parse() needs an enterprise plan or a self-hosted plan. It uses OmniParser v2 on the server for element detection.

Syntax

Parameters

None.

Returns

Promise<ParseResult> - Object containing detected UI elements

ParseResult

ParsedElement

Examples

Get All Elements on Screen

Find Clickable Elements

Find and Click an Element by Content

Filter by Element Type

Build Custom Assertions

Use Bounding Box Coordinates

View Annotated Screenshot

How It Works

  1. TestDriver captures a screenshot of the current screen
  2. The image is sent to the TestDriver API
  3. OmniParser v2 analyzes the image to detect all UI elements
  4. Each element is classified by type (text, icon, button, etc.) and interactivity
  5. Bounding box coordinates are returned in pixel coordinates matching the screen resolution
OmniParser detects elements visually — it works with any UI framework, native apps, and even non-standard interfaces. It does not rely on DOM or accessibility trees.

Best Practices

For locating and interacting with a specific element, prefer find() which uses AI vision. Use parse() when you need a complete inventory of all elements on screen.
Use the interactivity field to distinguish between clickable and non-interactive elements.
If elements aren’t being detected, the page may not be fully loaded. Add a wait first.
The annotatedImageUrl provides a visual overlay showing all detected elements with their bounding boxes — great for debugging.