From 5f80282b0b7a433250d8a8dc6a6a3e7a044f4842 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 25 Jan 2022 19:37:03 -0800 Subject: [PATCH] fix: Fix driver path env vars, driver documentation --- README.md | 10 ++++++++++ index.js | 2 +- package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5e8fb9..fc38234 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,16 @@ npm install --save-dev karma-local-wd-launcher ``` +## Drivers + +This launcher assumes that drivers such as `chromedriver`, `geckodriver`, and +`safaridriver` (Mac only) are already installed, executable, and in your `PATH`. + +Alternately, you may use the environment variables `CHROMEDRIVER_PATH`, +`GECKODRIVER_PATH`, or `SAFARIDRIVER_PATH` to indicate where these drivers are +installed. + + ## Configuration ```js diff --git a/index.js b/index.js index 846062f..8c1dcfb 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ const LocalWebDriverBase = win32: driverCommand, }; - this.ENV_CMD = this.browserName.toUpperCase() + '_CMD'; + this.ENV_CMD = driverCommand.toUpperCase() + '_PATH'; const config = { protocol: 'http:', diff --git a/package.json b/package.json index 35a45a9..55c1d68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "karma-local-wd-launcher", - "version": "1.0.0", + "version": "1.0.1", "description": "Karma Local WebDriver Launcher - Launches local web browsers using WebDriver, to enable screenshots and other advanced tests to be executed in-browser.", "main": "index.js", "repository": {