diff --git a/lib/config.ts b/lib/config.ts index 65811aa9a..37db785cc 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -28,6 +28,13 @@ export interface Config { */ seleniumServerJar?: string; + /** + * The timeout milliseconds waiting for a local standalone Selenium Server to start. + * + * default: 30000ms + */ + seleniumServerStartTimeout?: number; + /** * Can be an object which will be passed to the SeleniumServer class as args. * See a full list of options at diff --git a/lib/driverProviders/local.ts b/lib/driverProviders/local.ts index c3c389be7..740e759df 100644 --- a/lib/driverProviders/local.ts +++ b/lib/driverProviders/local.ts @@ -103,7 +103,7 @@ export class Local extends DriverProvider { this.server_ = new remote.SeleniumServer(this.config_.seleniumServerJar, serverConf); // start local server, grab hosted address, and resolve promise - this.server_.start().then((url: string) => { + this.server_.start(this.config_.seleniumServerStartTimeout).then((url: string) => { logger.info('Selenium standalone server started at ' + url); this.server_.address().then((address: string) => { this.config_.seleniumAddress = address;