Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

selenium-standalone

webdriverio630.4kMIT10.0.1TypeScript support: definitely-typed

installs a selenium-standalone command line to install and start a standalone selenium server

readme

Node.js Selenium Standalone Test Supported node versions

A node based CLI library for launching Selenium with WebDriver support.

Supported Drivers:

Available browsers

By default, Google Chrome, Firefox and Microsoft Edge are available when installed on the host system.

Starting from v6.22 chrome, edgechromium, and geckodriver support latest as version.

Starting from v9.0.6 supported changes regarding new storage for latest versions of chromedriver.

Starting from v9.2.0 added new feature 'onlyDriver'

Install & Run

As Global NPM Package

npm install selenium-standalone -g
selenium-standalone install && selenium-standalone start

As a Local NPM Package

npm install selenium-standalone --save-dev
npx selenium-standalone install && npx selenium-standalone start

As a Docker Service

docker run -it -p 4444:4444 webdriverio/selenium-standalone

If you run Chrome or Firefox tests within a Docker container make sure you set capabilities so that the session is headless, e.g.:

capabilities: {
  browserName: 'chrome',
  'goog:chromeOptions': {
    args: ['--no-sandbox', '--headless']
  }
}

or Firefox:

capabilities: {
  browserName: 'firefox',
  'moz:firefoxOptions': {
    args: ['-headless']
  }
}

If you are looking for more sophisticated Docker container that allows you to run browser, check out the Docker Selenium project.

Command line interface (CLI)

See CLI docs

Application Programming Interface (API)

See API docs

Tips

Examples of combining with other tools

:woman_technologist: :man_technologist: Contributing

You like this project and want to help making it better? Awesome! Have a look into our Contributor Documentation to get started with setting up the repo.

If you're looking for issues to help out with, check out the issues labelled "good first pick". You can also reach out in on Discord if you have question on where to start contributing.

changelog

10.0.0 (2024-06-24)

  • BREAKING CHANGE: dropped node12 support, minimum version is node14
  • added proxy complience

9.2.3 (2023-10-21)

  • fixed onCancel bug with got

9.2.2 (2023-08-26)

  • fixed splitting opts.javaArgs

9.2.1 (2023-08-26)

  • added checking downloaded files

9.1.0 (2023-08-26)

  • added new feature processKiller

9.0.6 (2023-08-24)

  • support new storage for the latest chromedriver, since v116 (channel: stable, beta, dev, canary)

7.1.0 (2021-07-01)

  • support Apple M1 for chrome and gecko drivers #558
  • prevent selenium process from hanging if spawned programmatically without stdout/stderr handlers

7.0.1 (2021-07-01)

  • removed spawnCb

7.0.0 (2021-06-18)

  • BREAKING CHANGE drop nodejs 10, minimum version is 12
  • BREAKING CHANGE removed callbacks for install and start commands
  • BREAKING CHANGE install and start commands are Promises now!
  • BREAKING CHANGE docker images are built with jdk11
  • BREAKING CHANGE dropped support of old browser drivers and platforms
  • BREAKING CHANGE change folder structure #491
  • BREAKING CHANGE removed spawnCb
  • check port before starting selenium #553

6.24.0 (2021-06-16)

  • selenium 4 support
  • update default versions
  • package updates

6.23.0 (2020-12-02)

  • allow specifying fullURL to download selenium or browser driver #520
  • increased download and startup timeouts, and added more logging #519
  • edgechromium startup disabled for linux platform

6.22.2 (2020-11-30)

  • edgechromium install disabled for linux platform

6.22.1 (2020-11-27)

  • avoid mutating the default config

6.22.0 (2020-11-27)

  • chrome, edgechromium, and geckodriver support latest as version
  • replaced async package with native promises
  • resolved issues #468 #502 #511

6.21.0 (2020-11-26)

  • resolved issues #357 #457 #376 #488 #489
  • replaced request with got
  • update diedriver version to 3.150.1
  • updated chromiumedge version to 87.0.637.0
  • updated geckodriver version to 87.0.637.0
  • decreased package size by 60% (8.6Mb)
  • nodejs version in docker updated to 12
  • added eslint + prettier
  • minor bug fixes

6.20.1 (2020-10-09)

  • Fix chromiumedge privileges

6.20.0 (2020-09-11)

  • add support for chrome edge driver

6.19.0 (2020-08-31)

  • feat(chrome): update to latest

6.18.0 (2020-07-20)

  • chore: Update binaries versions #463

6.17.0 (2019-11-26)

  • add opts.ignoreExtraDrivers #448
  • fix prefer user config rather than default #365

6.15.4 (2018-11-15)

  • Updated Selenium Server to 3.141.0
  • Updated ChromeDriver to 2.43
  • Updated IEDriver to 3.14.0
  • Updated GeckoDriver to 0.23.0
  • Added back all Edge WebDriver combinations

6.15.3 (2018-09-13)

  • Added Docker healthcheck
  • Updated ChromeDriver to 2.41

6.15.2 (2018-08-23)

  • Improved Docker image
  • Improved release script

6.15.1 (2018-06-19)

  • Updated Selenium to 3.12.0
  • Updated ChromeDriver to 2.40
  • Updated IEDriver to 3.12.0
  • Updated GeckoDriver to 0.20.1
  • Updated EdgeDriver to 17134
  • Added Docker support for Linux
  • Fixed tests, live tests still failing on Travis CI (timeouts).

6.12.0 (2017-12-05)

  • Update default selenium to 3.7.1 (#327)
  • Update default IEDriver to 3.7.1 (#327)
  • Update default geckodriver to 0.19.1 (#327)
  • Update default Edge driver to 16299 (#330)
  • Update downstream dependencies

6.11.0 (2017-10-20)

  • Update default selenium to 3.6.0 (#310)
  • Update default chromedriver to 2.33 (#310)
  • Update default geckodriver to 0.19.0 (#310)
  • Update default IEDriver to 3.6.0 (#310)
  • Ability to install only one driver from default list (#313)

6.10.0 (2017-10-07)

  • Fix selenium server status check URL when passing node config file (#308)
  • Add timeout option to download request (#309)

6.9.0 (2017-09-04)

  • Update default selenium to 3.5.3 (#302)
  • Update default chromedriver to 2.32 (#302)

6.8.0 (2017-08-28)

  • Update default selenium to 3.5.2 (#301)
  • Update default IEDriver to 3.5.1 (#301)

6.7.0 (2017-08-15)

  • Update default selenium to 3.5.0 (#296)
  • Update default IEDriver to 3.5.0 (#296)
  • Update default geckodriver to 0.18.0 (#295)

6.6.0 (2017-07-28)

  • Update default chromedriver to 2.31 (#290)

6.5.0 (2017-06-08)

  • Ability to install Microsoft Edge driver (#284)
  • Update default chromedriver to 2.30 (#285)

6.4.1 (2017-04-24)

  • Fix seleniumArgs handling in config file

6.4.0 (2017-04-24)

  • Update selenium to 3.4.0
  • Update IEDriver to 3.4.0
  • Update geckodriver to 0.16.0

6.3.0 (2017-04-21)

  • Update default chromedriver to 2.29 (#274)
  • Update default IEDriver to 3.3.0 (#274)

6.2.0 (2017-04-05)

  • Update default Selenium Server to 3.3.1 (#273)
  • Update default Firefox driver to 0.15.0 (#273)
  • Ability to collect debug logs for bug reports (#271)

6.1.0 (2017-03-17)

  • Update default chromedriver to 2.28 (#267).

6.0.1 (2017-02-01)

  • Fix default version for IEDriver to 3.0.0.

6.0.0 (2017-01-29)

  • BREAKING CHANGE Using selenium 3.0.1 (Java 8 is needed)
  • Using yarn as package manager
  • Updated dependencies

5.11.2 (2017-01-26)

  • Fix support for Node.JS v0.12

5.11.1 (2017-01-17)

  • Update request and mocha dependencies.

5.11.0 (2017-01-17)

  • update geckodriver to v0.13.0

5.10.0 (2017-01-16)

  • update chromedriver version to 2.27
  • --config file option

5.9.1 (2017-01-07)

  • Fix incorrect download urls for Firefox drivers (#251)

5.9.0 (2016-12-04)

  • update geckodriver to v0.11.1

5.8.0 (2016-10-26)

  • update chrome driver to 2.25 #240
  • add opts.javaArgs #234

5.7.2 (2016-09-22)

  • fix expectedRequest when less drivers given than usual

5.7.1 (2016-09-16)

5.7.0 (2016-09-16)

  • really fix selenium 3 install feature
  • add tests around computing the download urls
  • switch to new chromedriver 2.24

5.6.4 (2016-09-15)

  • Handle geckodriver/Marionette urls weirdness (#222)

5.6.3 (2016-09-09)

  • Support geckodriver v0.9.0 and v0.8.0 (6ef046448db058845aac709e839894ac95c65053)

    5.6.2 (2016-08-29)

  • allow beta versions of selenium to be used #206
  • allow installing old chrome driver versions #213

5.6.1 (2016-08-23)

  • update download path for firefox driver 0.10.0 on mac

5.6.0 (2016-08-23)

  • upgrade chromedriver to 2.23
  • upgrade firefox driver to 0.10.0
  • better error message when java is possibly outdated

5.5.0 (2016-07-08)

  • add proxy option to programmatic interface

5.4.1 (2016-07-06)

  • fix install script when geckodriver downloaded

5.4.0 (2016-07-01)

  • update geckodriver to v0.9.0
  • update selenium to 2.53.1

5.3.1 (2016-06-28)

5.3.0 (2016-06-28)

  • fix firefox win32 download url

5.2.0 (2016-06-28)

  • add marionette driver
  • bump chromedriver

5.1.1 (2016-06-10)

5.1.0 (2016-03-23)

  • update to latest versions

5.0.0 (2016-02-24)

  • BREAKING CHANGE when opts.drivers are passed on the programmatic interface, do not merge all drivers option, only the one passed. So if you use {drivers: {chrome: {version: 42}}}, you will only get chrome version 42, not IE, not firefox

4.9.1 (2016-02-20)

  • node 0.10 compat for fs.access

4.9.0 (2016-02-02)

4.8.0 (2015-12-08)

  • feat(paths): support basePath option
  • feat(https): use https downloads by default

4.7.2 (2015-11-23)

  • fix(hub): selenium-standalone can now be run as hub

4.7.1 (2015-10-22)

  • fix(version): treat version as strings to allow 2.20 version, fixes #142

4.7.0 (2015-09-30)

  • feat(install): add install --silent

4.6.3 (2015-09-25)

  • fix require urijs

4.6.2 (2015-09-25)

  • update urijs package (renamed)

4.6.1 (2015-09-01)

  • release: do not include .selenium in package

4.6.0 (2015-09-01)

  • feat: selenium 2.47.1, ie driver 2.47.0, chrome 2.18
  • fix: fix default IE driver download url computation
  • fix: only append default stderr stdout listeners if not added by user

4.5.3 (2015-07-06)

  • feat: update to latest selenium/drivers version

4.4.3 (2015-07-06)

  • fix: error if already started

4.4.2 (2015-05-25)

  • fix: programmatic usage was broken

4.4.1 (2015-05-25)

  • fix: use isaacs/node-which instead of vvo/whereis to find JAVA path
    • fixes #96
  • fix: better handle selenium started event (when roles are hub or node)
    • fixes #98
    • fixes #97

4.4.0 (2015-04-17)

  • upgrade chrome driver to 2.15

4.3.0 (2015-04-17)

  • parse selenium's -hub argument to find the hub hostname

4.2.2 (2015-03-23)

  • fix selenium binary start

4.2.1 (2015-03-20)

  • FIX: flush stderr/stdout of selenium so that it does not fails

4.2.0 (2015-03-02)

  • upgrade to selenium 2.45.0

4.1.0 (2015-02-06)

  • update chrome driver to 2.14

4.0.0 (2015-02-06)

  • cache downloads, see #68

3.3.0 (2015-02-03)

  • forward request error to install error, #64

3.2.0 (2015-01-23)

  • add --baseURL, --drivers.*.baseURL options, also in programmatic API

3.1.2 (2015-01-17)

  • try to force npm to publish

3.1.1 (2015-01-17)

  • fixes #60, programmatic install without a progressCb

3.1.0 (2015-01-17)

  • add opts.logger to install(), defaults to noop
  • add opts.progressCb to install(opts), now you can receive progress information
  • log more info when installing: source, destination
  • show progress when installing
  • check for pathsexistence before starting and error accordingly
  • add opts.spawnCb to start(), now you can receive the spawned process asap
  • more tests
  • readme tweaks

3.0.3 (2015-01-10)

  • inform user that start-selenium is deprecated

3.0.2 (2015-01-10)

  • ie fix

3.0.1 (2015-01-10)

  • ie fix

3.0.0 (2015-01-10)

  • complete refactoring
  • command line is now named selenium-standalone
  • you must use selenium-standalone install and then selenium-standalone start
  • programmatic API changed too, require('selenium-standalone').install(cb) or require('selenium-standalone').start(cb)
  • using the programmatic API, you must kill the server yourself, the child_process is sent in the start callback: cb(err, cp)
  • you can now install and start different selenium versions and drivers versions

2.44.0-7 (2015-01-04)

  • fix start-selenium when port is not 4444

2.44.0-6 (2015-01-03)

  • add tests on new cb() functionnality
  • backward compat for people not using a cb
  • lower down callback loop to 200ms

2.44.0-5 (2015-01-03)

  • fix start-selenium command line (missing callback)

2.44.0-4 (2015-01-02)

  • programmatic API now exposes a callback to inform when selenium has started

2.44.0-3 (2015-01-02)

  • update chromedriver to 2.13

2.44.0-2 (2015-01-02)

  • initial history generation