Procházet zdrojové kódy

fixed --web-driver-executable-path issue

Former-commit-id: 91138f03bfc2c07fdb48fd2d62c7a0a91d9fb304
Gildas před 5 roky
rodič
revize
e019d971b1

+ 1 - 1
cli/back-ends/webdriver-chromium.js

@@ -56,7 +56,7 @@ function getBrowserOptions(options) {
 		chromeOptions.setChromeBinaryPath(options.browserExecutablePath);
 	}
 	if (options.webDriverExecutablePath) {
-		process.env["webdriver.chrome.driver"] = options.webDriverExecutablePath;
+		process.env["PATH"] = process.env["PATH"] + ";" + options.webDriverExecutablePath.replace(/geckodriver(\.exe)?$/, "");
 	}
 	if (options.browserArgs) {
 		const args = JSON.parse(options.browserArgs);

+ 1 - 1
cli/back-ends/webdriver-gecko.js

@@ -55,7 +55,7 @@ function getBrowserOptions(options) {
 		firefoxOptions.setBinary(options.browserExecutablePath);
 	}
 	if (options.webDriverExecutablePath) {
-		process.env["webdriver.gecko.driver"] = options.webDriverExecutablePath;
+		process.env["PATH"] = process.env["PATH"] + ";" + options.webDriverExecutablePath.replace(/geckodriver(\.exe)?$/, "");
 	}
 	const extensions = [];
 	if (options.browserDisableWebSecurity === undefined || options.browserDisableWebSecurity) {