Skip to main content

Overview

Parse the current screen using OmniParser v2 to detect all visible UI elements. Returns structured data including element types, text content, interactivity levels, and bounding box coordinates. This method analyzes the entire screen and returns every detected element. It’s useful for:
  • Understanding the full UI layout of a screen
  • Finding all clickable or interactive elements
  • Building custom element-based logic
  • Debugging what elements TestDriver can detect
  • Accessibility auditing
Availability: parse() requires an enterprise or self-hosted plan. It uses OmniParser v2 server-side 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.