Skip to content

Releases: straker/browser-driver-manager

v2.0.1

04 Oct 15:10
Compare
Choose a tag to compare
  • fix: sync package.json dependencies to match actual dependencies @dbjorge

v2.0.0

06 Jun 23:30
Compare
Choose a tag to compare

Breaking Change

V1 use to detect the version of Chrome installed on the system and install the corresponding version of the chromedriver npm package. However this had problems as the chromedriver package wasn't always up-to-date with the latest version so when Chrome updated to the next version, the chromedriver package could lag behind and still cause out-of-sync issues. Additionally the chromedriver package didn't always have the latest versions of non-stable channels so asking for Chrome Canary wasn't always reliable.

V2 uses the newly released Chrome for Testing to manage Chrome. This enables both installing specific versions of Chrome and fixes the previous chromedriver package issue. V2 utilizes the puppeteer/browser script to manage the installation of Chrome and Chromedriver as it can handle downloading the binaries (and the multiple changes to the chromedriver download URL). This means that v2 no longer uses the chromedriver npm package to get chromedriver.

Once installed, a directory is created in your home directory called .browser-driver-manager. The directory will contain a .env file which will list the install path of both Chrome and Chromedriver under CHROME_TEST_PATH and CHROMEDRIVER_TEST_PATH respectively.

# ~/.browser-driver-manager/.env
CHROME_TEST_PATH="~/.browser-driver-manager/chrome/mac_arm-125.0.6422.141/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
CHROMEDRIVER_TEST_PATH="~/.browser-driver-manager/chromedriver/mac_arm-125.0.6422.141/chromedriver-mac-arm64/chromedriver"

This means in v2 you'll need to grab the Chromedriver path from the ~/.browser-driver-manager/.env file and not from the chromedriver npm package. Additionally, you'll need to grab the Chrome path pass the path to any browser driver, such as Webdriver.

Here's an example of grabbing the Chromedriver path in v1 and the change for v2.

// v1
const chromedriver = require('chromedriver');
console.log(chromedriver.path);

// v2
require('dotenv').config({ path: '.browser-driver-manager/.env' })
console.log(process.env.CHROMEDRIVER_TEST_PATH);

v1.0.4

04 Feb 01:54
Compare
Choose a tag to compare

chore: support node <14 with or operator

v1.0.3

28 Jan 16:19
Compare
Choose a tag to compare

Fix bin script

v1.0.2

28 Jan 05:15
Compare
Choose a tag to compare

Initial Release