Automation Native
This package contains helper methods which can be use in automation testing to interact with native OS.
They should be used in a test runner to interactive with the desktop capabilities e.g. @openfin/automation-cli
Installation
Run npm i @openfin/automation-native
.
Code examples
import { NativeDriver, NativeDriverKeys } from "@openfin/automation-native";
describe('Test Suite', () => {
it('Send mouse click to a location on screen', async () => {
await NativeDriver.actions([
{ type: "mousePress", { x: 100, y: 100}}
]);
});
it('Send key press to the desktop', async () => {
await NativeDriver.actions([
{ type: "keyPress", { key: NativeDriverKeys.A }}
]);
});
});