find() locates it on screen. No selectors, IDs, or DOM access.
find() returns an element. You can act on it with methods like click() and hover(). See Perform actions.
Describe the element
A good description has up to three parts:- What it says. The visible label or text, such as “Sign in” or “Add to cart”.
- What it is. A button, an input field, an icon, a link, a checkbox.
- Where it is, when there’s more than one match. A position, a color, or a nearby element.
- Lead with visible text. Text on screen is the most reliable thing to match.
- Describe icons by how they look. “Shopping cart icon in the top right corner” works better than “cart link”.
- Keep changing values out. A description with a changing name or ID never reuses the cache. Describe the element itself instead.
- Describe one element. For a list of matches, use
findAll().
Check whether it was found
find() keeps checking the screen every 5 seconds for up to 10 seconds. If nothing matches, it doesn’t throw. It returns an element whose found() is false:
ElementNotFoundError.
For something slow to appear, raise the timeout:
Make the match stricter
When finding the wrong element is costly,find() has options to tighten the match:
Find every match
findAll() returns an array with one element per match:
Inspect a result
An element tells you where it was found and how sure the AI was:toJSON() adds the AI’s reasoning and whether the result came from the cache:
Next steps
find()
Every option, with examples.
Perform actions
Click, type, and scroll once you’ve found an element.
Caching
Reuse element positions from passing runs.
Debug a failing test
See what the screen showed when find() missed.

