ApplesauceOS
Read Markdown ↗Download .md

Element.findElement

Find the first matching element. Scoped to descendants.

js
element.findElement(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, or null when no match is found.

Example

js
const panel = UIHelper.waitForElement({id: "panel"}, 5000);
const field = panel.findElement({id: "search", visible: true});
if (field) console.log(field.getText());

Notes

The parent must still be valid. See the matching UIHelper method for options. Placeholder panel/child identifiers require inspection.

All JavaScript APIs · Automation playbook