From 3702a709fe251fed1de9ee1eab38593c2c371e94 Mon Sep 17 00:00:00 2001 From: Brett Delle Grazie Date: Tue, 5 Jun 2018 00:51:01 +0100 Subject: [PATCH] fix(local): Ensure webdriver.gecko.driver path is passed to Selenium (#4502) Always pass webdriver.gecko.driver property to Selenium if set in local mode. fixes #4501 --- lib/driverProviders/local.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/driverProviders/local.ts b/lib/driverProviders/local.ts index aa2edf2b9..d766e2780 100644 --- a/lib/driverProviders/local.ts +++ b/lib/driverProviders/local.ts @@ -17,8 +17,6 @@ import {Logger} from '../logger'; import {DriverProvider} from './driverProvider'; const SeleniumConfig = require('webdriver-manager/built/lib/config').Config; -const SeleniumChrome = require('webdriver-manager/built/lib/binaries/chrome_driver').ChromeDriver; -const SeleniumStandAlone = require('webdriver-manager/built/lib/binaries/standalone').StandAlone; const remote = require('selenium-webdriver/remote'); let logger = new Logger('local'); @@ -151,6 +149,9 @@ export class Local extends DriverProvider { if (this.config_.chromeDriver) { serverConf.jvmArgs.push('-Dwebdriver.chrome.driver=' + this.config_.chromeDriver); } + if (this.config_.geckoDriver) { + serverConf.jvmArgs.push('-Dwebdriver.gecko.driver=' + this.config_.geckoDriver); + } this.server_ = new remote.SeleniumServer(this.config_.seleniumServerJar, serverConf);