Skip to content

Commit

Permalink
fix issue nightwatchjs#1992 - chromedriver path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
KGBemployee committed Apr 20, 2019
1 parent cebfaec commit fb5ce35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/runner/wd-instances/base-wd-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit fb5ce35

Please sign in to comment.