0.1.7 • Published 2 years ago

@bright-fish/node-ui-automation v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

0.1.7

2 years ago

0.1.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago