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: AccessibilityTree
Defined in: index.d.ts:114 Accessibility tree bound to a specific window. Provides snapshot and ref-based actions for desktop automation (Windows UIA).Constructors
Constructor
new AccessibilityTree(): AccessibilityTree
Returns
AccessibilityTree
Accessors
windowId
Get Signature
get windowId(): number
Defined in: index.d.ts:127
Get the window handle as an integer ID.
Returns
number
windowTitle
Get Signature
get windowTitle(): string
Defined in: index.d.ts:125
Get the window title.
Returns
string
Methods
activate()
activate(Defined in: index.d.ts:145 Invoke/click an element (button, link, menuitem).refId):void
Parameters
refId
number
Returns
void
clearRefs()
clearRefs(): void
Defined in: index.d.ts:163
Clear all stored element refs.
Returns
void
expandCollapse()
expandCollapse(Defined in: index.d.ts:153 Expand or collapse a dropdown or tree item.refId):void
Parameters
refId
number
Returns
void
find()
find(Defined in: index.d.ts:186 Search the tree using the chosen traversal order.order,role?,name?,visibleOnly?,maxResults?,collapseStructural?):AccessibilityNodeJs[]
order–TraversalOrder.DepthFirstorTraversalOrder.BreadthFirstrole– keep nodes whose ARIA role equals this value (e.g.AriaRole.Button,AriaRole.TabList,AriaRole.MenuBar). Cross-platform ARIA roles, not the platform-nativeUIA.ControlType.*/AX*/AT-SPI.Role.*vocabulary.name– keep nodes whose title or description contains this stringvisible_only– skip invisible nodes (defaultfalse)max_results– stop after this many matches (uses.take())collapse_structural– hoist empty structural wrappers (for examplePane/Group/Custom/Documenton Windows,AXGroup/AXGenericGroup/AXUnknownon macOS, AT-SPIPanel/Filler/Sectionon Linux) out of the walk so role searches do not hit unnamed containers (defaultfalse)
refId values usable
with action methods (activate, setValue, …).
Parameters
order
TraversalOrder
role?
AriaRole | null
name?
string | null
visibleOnly?
boolean | null
maxResults?
number | null
collapseStructural?
boolean | null
Returns
AccessibilityNodeJs[]
focusElement()
focusElement(Defined in: index.d.ts:157 Focus an element (brings window to foreground).refId):void
Parameters
refId
number
Returns
void
getBounds()
getBounds(Defined in: index.d.ts:159 Get the live bounding box of an element.refId):BoundingBox
Parameters
refId
number
Returns
BoundingBox
getSupportedActions()
getSupportedActions(Defined in: index.d.ts:161 Get the list of supported actions for an element.refId):string[]
Parameters
refId
number
Returns
string[]
scrollIntoView()
scrollIntoView(Defined in: index.d.ts:155 Scroll an element into view.refId):void
Parameters
refId
number
Returns
void
select()
select(Defined in: index.d.ts:151 Select a tab, radio button, or list item.refId):void
Parameters
refId
number
Returns
void
setValue()
setValue(Defined in: index.d.ts:147 Set the text value of an element (textbox, combobox).refId,value):void
Parameters
refId
number
value
string
Returns
void
snapshot()
snapshot(Defined in: index.d.ts:143 Take a snapshot of the window’s accessibility tree.visibleOnly?):AccessibilityNodeJs
visible_only (default false) controls whether nodes whose
non-standard AXVisible attribute reads false are dropped from
the result.
AXVisible is a Chromium-specific extension; native macOS apps
don’t expose it, so the filter only matters for browser windows.
Chrome reports many web-content nodes (including AXLink) as
AXVisible=false because its accessibility-tree visibility is
compositor-driven, not pixel-driven — setting visible_only=true
on a Chrome window will silently drop most of the page including
links.
Parameters
visibleOnly?
boolean | null
Returns
AccessibilityNodeJs
toggle()
toggle(Defined in: index.d.ts:149 Toggle a checkbox or switch.refId):void
Parameters
refId
number
Returns
void
fromForeground()
Defined in: index.d.ts:116 Create an accessibility tree bound to the current foreground window.staticfromForeground():AccessibilityTree
Returns
AccessibilityTree
fromHwnd()
Defined in: index.d.ts:123 Create an accessibility tree from a platform-specific window identifier. On Windows this is an HWND; on macOS it is a PID.staticfromHwnd(hwnd):AccessibilityTree
Parameters
hwnd
number
Returns
AccessibilityTree
fromPid()
Defined in: index.d.ts:118 Create an accessibility tree bound to the first visible window of a process.staticfromPid(pid):AccessibilityTree
Parameters
pid
number
Returns
AccessibilityTree
