Principle:A9T9 RPA API Call Resolution
| Knowledge Sources | |
|---|---|
| Domains | Browser_Automation, Scripting_API |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Mechanism for resolving `uiv.*` API calls from a sandboxed script to concrete search results (element matches, image matches, OCR text matches) via the bridge boundary.
Description
API Call Resolution is the runtime process of dispatching `uiv.*` API calls from the JS-Interpreter sandbox to the host environment and returning structured results. When a script calls `uiv.findElements(locator)`, `uiv.findImage(image)`, or `uiv.ocr.findText(text)`, the call is serialized and sent through the `__uiv_bridge` async function to the host.
The host resolves the request:
- Element finders dispatch to DOM resolution (`getElementByLocator`) and return `Match` objects with coordinates and element references
- Image finders dispatch to the vision search pipeline (`searchVision`) and return `Match` objects with screen coordinates
- OCR finders dispatch to the OCR pipeline (`runOCR` + `searchTextInOCRResponse`) and return `Match` objects with text coordinates
The result is serialized back to the sandbox as a pseudo-object that the script can use for subsequent actions (e.g. `uiv.browser.click(match.x, match.y)`).
Usage
Use this principle when designing a sandboxed scripting API that must bridge calls to the host environment for operations not available in the sandbox (DOM access, native input, computer vision, OCR).
Theoretical Basis
API call resolution is a marshalling boundary:
Failed to parse (syntax error): {\displaystyle \text{Result} = \text{Bridge}(\text{Serialize}(\text{API\_call})) \to \text{Host} \to \text{Deserialize}(\text{Response}) }