windows-app
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

windows-app

Automate Windows applications.

Install

npm install windows-app

This module vendors Windows Application Driver. You will need to enable developer mode yourself.

Usage

import windowsApp from 'windows-app';

const {select, close} = await windowsApp('Microsoft.WindowsCalculator_8wekyb3d8bbwe!App'); // Calculator app

await select.name_('One').click();
await select.name_('Plus').click();
await select.name_('Two').click();
await select.name_('Equals').click();
const result = Number((await select.accessibilityId('CalculatorResults')).getText().replace('Display is', ''));

console.log(`The result of 1 + 2 is ${result}`);
//=> 'The result of 1 + 2 is 3'

await close();

API

windowsApp(appId, options?)

Launch the specified application and provide options to manipulate it.

Only one application can be launched at a time.

appId

Type: string

The path to an exe file or the id of a UWP.

options

Type: object

timeout

Type: integer | false
Default: 10000

The timeout for interactions with elements and application startup in milliseconds. Set to false to disable.

Return value

select.xPath(xPath)
select.class(class_)
select.id(id)
select.name_(name)
select.accessibilityId(accessibilityId)

Select an element in the launched application.

driver

The selenium-appium driver for lower-level testing.

close()

Close the application and end all associated processes. Returns a promise that resolves when completed.

Tips

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    0
  • 1.0.1
    0
  • 1.0.0
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i windows-app

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

7.19 MB

Total Files

21

Last publish

Collaborators

  • richienb