Element exists
Passes when a locator finds an Element in the front app.
Element locator exists
Details #
Looks for the Element in the front app's Accessibility tree. It passes when the locator resolves to something, using the same matching as the click and wait steps: role, title, identifier, path and alternatives. No clicking or waiting happens; the answer is immediate.
If the app isn't running or nothing is in front, the Element isn't there and the condition fails (a negated one passes).
Every condition accepts "negate": true, which flips the verdict. The trace records what was compared before the flip, so a negated condition that blocks a macro still shows the real values.
Conditions in an Only if list combine with all: every one must pass, and an empty list always passes. An if step or a repeat loop takes a match of all (default) or any.
The trace shows found and the locator's role.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
locator | locator | Yes | A locator object; role is required. Record one with the picker rather than typing it by hand. |
Examples #
- Press ⌃⌥J
- If Save button exists
- Show “Save button found”
Save button