Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.simular.ai/llms.txt

Use this file to discover all available pages before exploring further.

Class: AccessibilityNode

Defined in: index.d.ts:14 A node in the platform accessibility tree. Thin binding for simulang_rs::AXNode (macOS AXUIElement / Windows UIA element / Linux AT-SPI accessible). Construct via the static factories or via tree-walking methods on another node / Instance / Window (children, find, scoredSearch). Properties are resolved from the underlying accessibility framework on each access; the node itself is just a handle.

Constructors

Constructor

new AccessibilityNode(): AccessibilityNode

Returns

AccessibilityNode

Accessors

automationId

Get Signature

get automationId(): string
Defined in: index.d.ts:41 UIA AutomationId (Windows). Empty on macOS / Linux.
Returns
string

className

Get Signature

get className(): string
Defined in: index.d.ts:24 Platform class name (Windows UIA ClassName / macOS subrole).
Returns
string

controlType

Get Signature

get controlType(): number
Defined in: index.d.ts:26 Numeric control type (UIA_ControlTypeIds on Windows, 0 on macOS).
Returns
number

description

Get Signature

get description(): string
Defined in: index.d.ts:30 Short description (AXDescription / UIA Name-adjacent fields).
Returns
string

helpText

Get Signature

get helpText(): string
Defined in: index.d.ts:37 Help text / tooltip.
Returns
string

isEnabled

Get Signature

get isEnabled(): boolean
Defined in: index.d.ts:43 Whether the node accepts user input.
Returns
boolean

localizedControlType

Get Signature

get localizedControlType(): string
Defined in: index.d.ts:28 Localized control type string.
Returns
string

name

Get Signature

get name(): string
Defined in: index.d.ts:22 Accessible name (title / label).
Returns
string

overallDescription

Get Signature

get overallDescription(): string
Defined in: index.d.ts:35 Synthetic, query-friendly description used by scoredSearch (combines the node’s role, label, value, and a small amount of ancestor context).
Returns
string

role

Get Signature

get role(): AriaRole
Defined in: index.d.ts:20 Cross-platform ARIA role.
Returns
AriaRole

value

Get Signature

get value(): string
Defined in: index.d.ts:39 Current text value (textbox content, slider value as string, …).
Returns
string

Methods

activate()

activate(): void
Defined in: index.d.ts:92 Invoke / click the element (button, link, menu item).

Returns

void

boundingBox()

boundingBox(): BoundingBox
Defined in: index.d.ts:48 Live bounding box of the element in global physical pixels. right and bottom are exclusive (Playwright / DOM convention).

Returns

BoundingBox

children()

children(): AccessibilityNode[]
Defined in: index.d.ts:54 Direct child nodes. Returns an empty array if the subtree has been torn down or the children attribute is unreadable (matching simulang-rs’s convention of treating walk failures as “no children”).

Returns

AccessibilityNode[]

expandCollapse()

expandCollapse(): void
Defined in: index.d.ts:100 Expand or collapse a dropdown or tree item.

Returns

void

focus()

focus(): void
Defined in: index.d.ts:107 Move keyboard focus to this element (brings its window to the foreground as a side effect on most platforms).

Returns

void

scoredSearch()

scoredSearch(order, maxNodes, collapseStructural, query, threshold): AccessibilityNode[]
Defined in: index.d.ts:90 Search this subtree by concept text, using bag-of-words paired-Jaccard scoring against each node’s overallDescription (simulang_rs::AXNodeSynthetic::summary_with_context). Returns every node whose score equals the maximum found and exceeds threshold — same semantics as simulang_rs::scored_search with BowJaccard::score(...).primary as the scorer and a permissive filter.
  • orderTraversalOrder.DepthFirst or TraversalOrder.BreadthFirst
  • max_nodes – upper bound on nodes visited (uses .take() over the walk)
  • collapse_structural – hoist empty structural wrappers out of the walk before scoring
  • query – natural-language concept Jaccard-compared against each node’s overallDescription
  • threshold – minimum score to keep a node

Parameters

order
TraversalOrder
maxNodes
number
collapseStructural
boolean
query
string
threshold
number

Returns

AccessibilityNode[]

scrollIntoView()

scrollIntoView(): void
Defined in: index.d.ts:102 Scroll the element into view.

Returns

void

select()

select(): void
Defined in: index.d.ts:98 Select a tab, radio button, or list item.

Returns

void

setValue()

setValue(value): void
Defined in: index.d.ts:94 Set the text value of the element (textbox, combobox, …).

Parameters

value
string

Returns

void

snapshot()

snapshot(): string
Defined in: index.d.ts:64 Render this node’s accessibility subtree as an indented Playwright-style aria snapshot string. One line per node, two spaces of indentation per depth level, in pre-order DFS. Roles are emitted raw (AXWindow on macOS, UIA.ControlType.* on Windows), with title and value appended when non-empty.

Returns

string

supportedActions()

supportedActions(): string[]
Defined in: index.d.ts:69 Human-readable names of the actions this node currently supports (e.g. "activate", "toggle", "scroll_into_view").

Returns

string[]

toggle()

toggle(): void
Defined in: index.d.ts:96 Toggle a checkbox or switch.

Returns

void

fromFocusedApplication()

static fromFocusedApplication(): AccessibilityNode
Defined in: index.d.ts:16 Root node of the currently focused application’s accessibility tree.

Returns

AccessibilityNode

fromPid()

static fromPid(pid): AccessibilityNode
Defined in: index.d.ts:18 Root node of the application identified by pid.

Parameters

pid
number

Returns

AccessibilityNode