@bright-fish/node-ui-automation
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

Node UI Automation

For use only on the Windows Operating System.

This is a node api add-on that wraps the Microsoft UI Automation Library. The majority of COM functionality is wrapped using napi. There may be a few missing things like proxies, however the majority of the functionality is here.

Installation

npm install @bright-fish/node-ui-automation

How to use

Open the winver "About Windows" application. Below is an automation that clicks the ok button in the About Windows dialog.

const { Automation, PropertyIds, TreeScopes, PatternIds } = require('@bright-fish/node-ui-automation');

const automation = new Automation();

const desktopElement = automation.getRootElement();

const aboutWindowsProperty = automation.createPropertyCondition(PropertyIds.NamePropertyId, 'About Windows');

const winverWindow = desktopElement.findFirst(TreeScopes.Subtree, aboutWindowsProperty);

const okProperty = automation.createPropertyCondition(PropertyIds.NamePropertyId, "OK");

const okButton = winverWindow.findFirst(TreeScopes.Subtree, okProperty);

const invokeProvider = okButton.getCurrentPattern(PatternIds.InvokePatternId);

invokeProvider.invoke();

Documentation

Most of the functionality is provided with similar names. The typings shipped with the library can help identify whats available to use.

Here is a link to the Microsoft documentation.

https://docs.microsoft.com/en-us/windows/win32/winauto/entry-uiauto-win32

Readme

Keywords

none

Package Sidebar

Install

npm i @bright-fish/node-ui-automation

Weekly Downloads

1

Version

0.1.7

License

MIT

Unpacked Size

473 kB

Total Files

172

Last publish

Collaborators

  • chris.nimmons