Skip to main content
This test opens Airbnb in Chrome and calls parse() to detect every UI element on screen.

Watch it run

The test

parse.test.mjs

How it works

  • parse() analyzes the screen and resolves to an object. Its elements array lists each detected element.
  • The result also has annotatedImageUrl, a screenshot with the elements marked.
  • It also has imageWidth and imageHeight.
  • Use parsing to explore an unfamiliar screen before you write find() descriptions.

Run it

The test is in the TestDriver SDK repository. Clone it, install dependencies, and run the file:
The test reads your API key from TD_API_KEY. Create a key at console.testdriver.ai/team/api-keys. Then set it in your environment or a .env file.