スタンドアロンモード
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());