# Element.findElementsInRect

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

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

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `rectangle` | object | {x,y,width,height} in native pixels; positive width and height. |
| `selector` | object \| string | Optional; defaults to {visible:true}. |
| `options` | object | Optional {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](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
