ApplesauceOS
Read Markdown ↗Download .md

UIHelper.findElements

Find all matching elements.

js
ui.findElements(selector, options?)

Arguments

ArgumentTypeMeaning
selectorobject | stringAttribute filters; a string means {name: string}. See the UIHelper guide for selectors.
optionsobjectOptional {timeout:0, interval:100}. Ordinary queries do not wait by default.

Returns

Element array, or [].

Example

js
const ui = UIHelper.forApp("com.example.app");
const buttons = ui.findElements({type: "Button", visible: true});
console.log(buttons.length);

Notes

Replace example identifiers with selectors verified in your app. Pinning an app does not open it. Global shortcuts use the unpinned foreground-app client.

Also available as

findElements.

All JavaScript APIs · Automation playbook