wdio-electron-service
Version:
WebdriverIO service to enable Electron testing
20 lines • 1.13 kB
TypeScript
import type { Services, Options } from '@wdio/types';
import type { ElectronServiceCapabilities, ElectronServiceGlobalOptions } from '@wdio/electron-types';
export default class ElectronLaunchService implements Services.ServiceInstance {
#private;
constructor(globalOptions: ElectronServiceGlobalOptions, _caps: unknown, config: Options.Testrunner);
onPrepare(_config: Options.Testrunner, capabilities: ElectronServiceCapabilities): Promise<void>;
/**
* Assigns unique debugging ports to each Electron instance to prevent port conflicts
* when running multiple Electron instances concurrently.
*
* This method runs at the beginning of each worker process and:
* 1. Dynamically finds available ports using get-port
* 2. Adds the --inspect flag with the assigned port to each Electron instance
* 3. Ensures each Electron instance has a unique debugging port
*
* This allows for reliable parallel debugging of multiple Electron instances.
*/
onWorkerStart(_cid: string, capabilities: WebdriverIO.Capabilities): Promise<void>;
}
//# sourceMappingURL=launcher.d.ts.map