@sitespeed.io/geckodriver
v0.37.2
Published
Install and launch Geckodriver for Mac, Linux or Windows.
Readme
Geckodriver
This is a simple package that downloads Geckodriver and provides a node api for accessing the path to the binary. With this package we try to minimize dependencies.
How to use?
import driver from '@sitespeed.io/geckodriver';
// Downloads Geckodriver the first time, then returns the path to the binary
const binPath = await driver.ensureBinPath();
// launch geckodriver from binPathThe package has no install script, so npm install does not download Geckodriver. If you need the driver before the first run, for example when you build a Docker image or on a machine without internet access during tests, download it with:
node node_modules/@sitespeed.io/geckodriver/install.jsbinPath() returns the path without a download.
You can override where you download the Geckodriver by setting process.env.GECKODRIVER_BASE_URL. You can skip donwloading Geckodriver by setting process.env.GECKODRIVER_SKIP_DOWNLOAD.
You can download another Geckodriver version by setting process.env.GECKODRIVER_VERSION.
GECKODRIVER_VERSION=0.26.0 node install.jsIf you don't set a version, the version in the package.json is used.
