From fb5ce35ccc6168737e1f9aa25534a060b11ee8d2 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 20 Apr 2019 19:13:30 +0300 Subject: [PATCH] fix issue #1992 - chromedriver path on windows --- lib/runner/wd-instances/base-wd-server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/runner/wd-instances/base-wd-server.js b/lib/runner/wd-instances/base-wd-server.js index c0b85a077f..4cb1c8d6db 100644 --- a/lib/runner/wd-instances/base-wd-server.js +++ b/lib/runner/wd-instances/base-wd-server.js @@ -149,6 +149,11 @@ class BaseWDServer { createProcess() { Logger.info(`Starting ${this.serviceName} on port ${this.settings.port}...`); + + if (process.platform === 'win32' && this.serviceName.toLocaleLowerCase().includes('chrome')) { + let chromedriver = require('chromedriver'); + this.settings.server_path = chromedriver.path; + } this.process = child_process.spawn(this.settings.server_path, this.cliArgs, BaseWDServer.spawnOptions); this.startProcessCreatedTimer();