From b337a8e8547af0b90663a35b07fd30b55ff61dd0 Mon Sep 17 00:00:00 2001 From: Akira Koyasu Date: Tue, 13 Dec 2016 19:38:25 +0900 Subject: [PATCH] feat(config): add seleniumServerStartTimeout (#3791) --- lib/config.ts | 7 +++++++ lib/driverProviders/local.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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 62ba223b0..45ad97318 100644 --- a/lib/driverProviders/local.ts +++ b/lib/driverProviders/local.ts @@ -104,7 +104,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;