ApplesauceOS
Read Markdown ↗Download .md

Element.findElementsInRect

Find elements whose snapshot centers lie in a rectangle. Scoped to descendants.

js
element.findElementsInRect(rectangle, selector?, options?)

Arguments

ArgumentTypeMeaning
rectangleobject{x,y,width,height} in native pixels; positive width and height.
selectorobject | stringOptional; defaults to {visible:true}.
optionsobjectOptional {timeout:0, interval:100}. Ordinary queries do not wait by default.

Returns

Element array.

Example

js
const panel = UIHelper.waitForElement({id: "panel"}, 5000);
console.log(panel.findElementsInRect({x: 0, y: 0, width: 300, height: 400}));

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