Principle:AIPexStudio AIPex Element Interaction By UID
| Knowledge Sources | |
|---|---|
| Domains | Browser_Automation, Accessibility |
| Last Updated | 2026-10-24 12:00 GMT |
Overview
A method for interacting with web page elements using stable UIDs from the accessibility snapshot, resolved through either CDP backend node IDs or DOM scripting.
Description
Once a snapshot assigns UIDs to elements, the agent needs to perform actions (click, fill, hover, get value) on those elements. In focus mode, the UID is resolved to a CDP `backendDOMNodeId`, which is then used to resolve a remote object and execute CDP commands. In background mode, the UID is used to locate the element via a data attribute injected during DOM snapshot collection, and actions are performed via `chrome.scripting.executeScript`. Both paths provide the same locator interface (`click`, `fill`, `hover`, `boundingBox`, `getEditorValue`), abstracting the backend from the caller.
Usage
Use this principle when an AI agent needs to click, type into, or inspect specific page elements. It is the action layer that complements the accessibility tree snapshot's discovery layer.
Theoretical Basis
Focus mode (CDP):
UID → backendDOMNodeId → DOM.resolveNode → remoteObject
→ Runtime.callFunctionOn (fill, click, hover)
→ Input.dispatchKeyEvent (if needed)
Background mode (DOM):
UID → data-aipex-uid attribute selector
→ chrome.scripting.executeScript (click, fill, hover)
→ DomActionResponse { success, error?, data? }