Skip to main content
Detect every element on the current screen and get back a list with each one’s type, text, and position.
parse() uses OmniParser v2. It works from the screenshot alone, so it doesn’t need a DOM or accessibility tree. To act on one specific element, use find() instead. Use parse() when you need an inventory of the whole screen.
parse() requires an Enterprise or self-hosted plan.

Signature

Parameters

None. parse() analyzes the screen as it is when you call it.

Returns

object
interactivity is a boolean, although the TypeScript types in sdk.d.ts declare it as a string. Compare it with true, not with a string like 'clickable'.

Errors

parse() throws if the screen analysis fails. The error message comes from the TestDriver API.

Examples

List what’s on screen

Find the clickable elements

Click an element by its text

Clicking by coordinates breaks when the layout changes. Prefer find() for clicks.

See what was detected

Complete example

tests/login-form.test.mjs
See the parse example for another complete test.
  • find(): locate one element and act on it
  • extract(): read one value off the screen
  • click(): click a point by its coordinates