Typescript SDK Reference
this page details the typescript sdk for interacting with the terminator server. it provides examples for common ui automation tasks, primarily focusing on windows applications.
setup
first, ensure the terminator server is running (see Getting Started). then, install the necessary dependencies if you haven’t already:
get the client and locator:
basic operations
opening applications and urls
you can open applications by their name or path, and open urls in the default (or specified) browser.
locating elements
the locator
method starts a chain to find elements. you can chain multiple locators to narrow down the search.
selectors use the format Strategy:Value
, e.g., name:Calc
, role:button
, id:myButtonId
.
interacting with elements
once you have a Locator
, you can perform actions like clicking, typing, or getting text.
note: element selectors (like name
, id
, role
) can vary between os versions and application updates. use tools like windows’ accessibility insights to find the correct selectors for your target application or let AI figure it out.
getting element state and attributes
you can check properties like visibility or retrieve detailed attributes.
expectations
terminator can wait for certain conditions to be met before proceeding or timing out.
error handling
the sdk methods return promises that reject on failure. use try...catch
blocks and check for ApiError
instances.
Was this page helpful?