本文へスキップ

スタンドアロンモード

WDIOテストランナーを使用せずに、通常のNode.jsスクリプトなどでサービスを使用することもできます。

startElectronメソッドはElectronServiceOptionsを受け入れ、設定を使用して新しいWDIOセッションを作成し、WebdriverIOブラウザオブジェクトを返します。

import { startElectron } from 'wdio-electron-service';

const browser = await startElectron({
appBinaryPath: '/path/to/binary',
appArgs: ['foo', 'bar=baz'],
});

const appName = await browser.electron.execute((electron) => electron.app.getName());

ようこそ!お手伝いしましょうか?

WebdriverIO AI Copilot