@svatah/yam-adapter-uia
Windows UI Automation adapter: the Yam agent surface over UIAutomationClient
- Source:
packages/adapter-uia· README:packages/adapter-uia/README.md - Install:
npm install @svatah/yam-adapter-uia - Version 0.1.0 · Apache-2.0
Exports
| Export | Kind | Signature | |
|---|---|---|---|
automationIdOf | function | export function automationIdOf(node: UiaNode): string | undefined | The automationId candidate's value (LLD §3.3, §7.5). |
childIndex | function | export function childIndex(nodes: readonly UiaNode[]): Map<number, number[]> | Every node's children, by parent index. |
controlPathOf | function | export function controlPathOf( | Window[Yam]/Group[2]/Button[Run] (LLD §3.3, §7.5). |
ConvertOptions | interface | export interface ConvertOptions | |
convertTree | function | export function convertTree(nodes: readonly UiaNode[], options: ConvertOptions): UiaSnapshotNode[] | Flatten one window's tree into snapshot nodes. See the AX sibling for the rule. |
createUiaSurface | function | export function createUiaSurface(config: | The factory the registry calls (LLD §2.4). |
encodePowershell | function | export function encodePowershell(script: string, argument: unknown): string | The request, and the console, put where the script can reach them (T7.2). |
escapeSendKeys | function | export function escapeSendKeys(text: string): string | Escape a literal for SendKeys. |
evaluateUiaPredicate | function | export function evaluateUiaPredicate( | |
insideChooser | function | export function insideChooser(nodes: readonly UiaNode[], index: number): boolean | Whether this node is inside a chooser's list (see roleOf). |
insideRow | function | export function insideRow(nodes: readonly UiaNode[], index: number): boolean | Whether this node is inside a table row (see roleOf). |
isTextual | function | export function isTextual(node: UiaNode): boolean | Whether the element takes text, for type and for value. |
literalValue | function | export function literalValue(ref: ValueRef): string | The literal a ValueRef names; an unresolved one is a caller mistake (LLD §8.2). |
matchNodes | function | export function matchNodes( | Every node the candidate matches, in snapshot order. |
nameOf | function | export function nameOf(node: UiaNode): string | The accessible name (REQ-SURF-4). |
powershellBridge | function | export function powershellBridge(options: PowershellBridgeOptions): UiaBridge | The real bridge: PowerShell, UIAutomationClient, and this machine. |
PowershellBridgeOptions | interface | export interface PowershellBridgeOptions | |
readablePowershellError | function | export function readablePowershellError(stderr: string): string | PowerShell's stderr, made readable (T7.2). |
registerUiaAdapter | function | export function registerUiaAdapter(): void | Register the adapter. Idempotent, like every other registration. |
roleOf | function | export function roleOf( | ControlType → an ARIA role, with LocalizedControlType consulted first. |
runPowershell | function | export async function runPowershell( | Run one PowerShell script, with a hard deadline. |
saidBy | function | export function saidBy(node: | The words an element itself puts on the screen (native-feedback D3). |
sendKeysFor | function | export function sendKeysFor(key: string): string | A key name → a SendKeys sequence. |
statesOf | function | export function statesOf(node: UiaNode): NodeState[] | The states LLD §2.2 lists, from the properties UIA exposes. |
synthesise | function | export function synthesise( | The candidate bundle for one element, best first (REQ-REC-3, LLD §3.3). |
UIA_ADAPTER_NAME | variable | UIA_ADAPTER_NAME = "uia" | The name this adapter is selected by in yam.config.yaml (LLD §2.4). |
UIA_CAPABILITIES | variable | UIA_CAPABILITIES: Capabilities | What this adapter can do (LLD §2.4). |
UiaAdapterOptions | interface | export interface UiaAdapterOptions | |
UiaAvailability | interface | export interface UiaAvailability | |
UiaAvailabilityState | typealias | export type UiaAvailabilityState | Why UI Automation could not be reached. |
UiaBridge | interface | export interface UiaBridge | |
UiaBridgeError | class | export class UiaBridgeError extends Error | |
UiaCheckContext | interface | export interface UiaCheckContext | |
UiaCommand | typealias | export type UiaCommand | An action the bridge performs on one element, addressed by its path. |
UiaNode | interface | export interface UiaNode | One automation element, flattened (LLD §7.5). |
UiaSnapshotCost | interface | export interface UiaSnapshotCost | What one snapshot() cost (Draft 2.8 §7.5). |
UiaSnapshotNode | interface | export interface UiaSnapshotNode extends SnapshotNode | A snapshot node, plus what only the walk knows. |
UiaSurface | class | export class UiaSurface implements AgentSurface | |
UiaWindow | interface | export interface UiaWindow | |
valueOf | function | export function valueOf(node: UiaNode): string | undefined | The value a read("value") and a value predicate see. |