ロボナットサービス
wdio-robonut-serviceはサードパーティのパッケージです。詳細についてはGitHub | npmをご覧ください。
Description
wdio-robonut-serviceは、nutjsをベースにしたクロスプラットフォーム(Windows、Darwin、Linux)のサービスで、システムマウス、キーボード、クリップボード、スクリーンへのアクセスと、画面上での画像テンプレートの検索が可能です。このサービスを使用すると、システムの移動、クリック、コピー、貼り付け、タイプなどが実行できます。また、画像テンプレートの存在確認や座標の取得、ドラッグアンドドロップなども可能です。
Instalation
npm install wdio-robonut-service
Config
interface RobotConfig {
mouseConfig?: { autoDelayMs: number; mouseSpeed: number };
screenConfig?: { confidence: number; autoHighlight: boolean; highlightDurationMs: number; highlightOpacity: number; resourceDirectory: string };
keyboardConfig?: { autoDelayMs: number };
imageFinder?: {
confidence?: number;
providerData?: {
methodType?: MethodNameType;
scaleSteps?: Array<number>;
searchMultipleScales?: boolean;
isRotation: boolean,
rotationOption?: { range?: number; overLap?: number; minDstLength?: number };
debug?: boolean;
roi?: Region;
};
};
}
Like wdio service in wdio.conf.ts
import RobotService from 'wdio-robonut-service';
const robotConfig: RobotConfig = {};
export const config: Options.Testrunner = {
//-
services: [[RobotService, robotConfig]],
//-
}
For wdio standalone/remote
execute it wherever once after browser initialisation
import RobotCommands from 'wdio-robonut-service';
const robotConfig: RobotConfig = {};
new RobotCommands(browser, robotConfig).addCommands()
Standalone
const robotConfig: RobotConfig = {};
new RobotDirect(robotConfig).instance()