Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 591 Bytes

standalone-mode.md

File metadata and controls

16 lines (11 loc) · 591 Bytes

Standalone Mode

You can also use the service without the WDIO testrunner, e.g. in a normal Node.js script.

The startElectron method accepts ElectronServiceOptions, creates a new WDIO session using your configuration and returns the WebdriverIO browser object:

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());