selenium-webdriver
The official WebDriver JavaScript bindings from the Selenium project
Last updated a month ago by GitHub Actions .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install selenium-webdriver 
SYNC missed versions from official npm registry.

selenium-webdriver

JavaScript language bindings for Selenium WebDriver. Selenium automates browsers for testing and web-based task automation.

Requires Node.js 22.23.4, 24.22.1 or 26.12.1 or newer.

Installation

npm install selenium-webdriver

Quick Start

const { Builder, Browser } = require('selenium-webdriver')

;(async function example() {
  let driver = await new Builder().forBrowser(Browser.CHROME).build()
  try {
    await driver.get('https://www.selenium.dev')
    console.log(await driver.getTitle())
  } finally {
    await driver.quit()
  }
})()

Selenium Manager automatically handles browser driver installation — no manual driver setup required.

Configuring the Builder

The Builder sets default options for all browsers in a single chain; options for non-selected browsers are dropped at build() time. The target browser can be swapped at runtime via the SELENIUM_BROWSER environment variable.

const { Builder, Browser } = require('selenium-webdriver')
const chrome = require('selenium-webdriver/chrome')
const firefox = require('selenium-webdriver/firefox')

let driver = new Builder()
  .forBrowser(Browser.FIREFOX)
  .setChromeOptions(new chrome.Options())
  .setFirefoxOptions(new firefox.Options())
  .build()

Running Against a Remote Server

To run scripts against a Selenium Grid or standalone server, point the Builder at the server URL, or set SELENIUM_REMOTE_URL:

let driver = new Builder().forBrowser(Browser.CHROME).usingServer('http://localhost:4444').build()
SELENIUM_REMOTE_URL="http://localhost:4444" node script.js

Node Support Policy

selenium-webdriver supports the Node.js versions under active upstream support. Each is supported until its end-of-life date; after that it is unsupported.

Node.js Support ends
22 2027-04-30
24 2028-04-30
26 2029-04-30

CI tests the earliest and latest supported versions available in rules_nodejs; issues and pull requests are welcome for any supported version.

Documentation

Support

Contributing

Contributions are welcome via GitHub pull requests. See the source code for this binding.

Links

License

Licensed under the Apache License 2.0.

Current Tags

  • 4.52.0                                ...           latest (a month ago)

124 Versions

  • 4.52.0                                ...           a month ago
  • 4.51.0                                ...           2 months ago
  • 4.50.0                                ...           2 months ago
  • 4.49.0                                ...           3 months ago
  • 4.48.0                                ...           3 months ago
  • 4.47.0                                ...           4 months ago
  • 4.46.0                                ...           5 months ago
  • 4.45.0                                ...           5 months ago
  • 4.44.0                                ...           6 months ago
  • 4.43.0                                ...           8 months ago
  • 4.42.0                                ...           8 months ago
  • 4.41.0                                ...           9 months ago
  • 4.40.0                                ...           10 months ago
  • 4.39.0                                ...           a year ago
  • 4.38.0                                ...           a year ago
  • 4.37.0                                ...           a year ago
  • 4.36.0                                ...           a year ago
  • 4.35.0                                ...           a year ago
  • 4.34.0                                ...           a year ago
  • 4.33.0                                ...           2 years ago
  • 4.32.0                                ...           2 years ago
  • 4.31.0                                ...           2 years ago
  • 4.30.0                                ...           2 years ago
  • 4.29.0                                ...           2 years ago
  • 4.28.1                                ...           2 years ago
  • 4.28.0                                ...           2 years ago
  • 4.27.0                                ...           2 years ago
  • 4.26.0                                ...           2 years ago
  • 4.25.0                                ...           2 years ago
  • 4.24.1                                ...           2 years ago
  • 4.24.0                                ...           2 years ago
  • 4.23.0                                ...           2 years ago
  • 4.22.0                                ...           2 years ago
  • 4.21.0                                ...           3 years ago
  • 4.20.0                                ...           3 years ago
  • 4.19.0                                ...           3 years ago
  • 4.18.1                                ...           3 years ago
  • 4.18.0                                ...           3 years ago
  • 4.17.0                                ...           3 years ago
  • 4.16.0                                ...           3 years ago
  • 4.15.0                                ...           3 years ago
  • 4.14.0                                ...           3 years ago
  • 4.13.0                                ...           3 years ago
  • 4.12.0                                ...           3 years ago
  • 4.11.1                                ...           3 years ago
  • 4.11.0                                ...           3 years ago
  • 4.10.0                                ...           3 years ago
  • 4.9.2                                ...           4 years ago
  • 4.9.1                                ...           4 years ago
  • 4.9.0                                ...           4 years ago
  • 4.8.2                                ...           4 years ago
  • 4.8.1                                ...           4 years ago
  • 4.8.0                                ...           4 years ago
  • 4.7.1                                ...           4 years ago
  • 4.7.0                                ...           4 years ago
  • 4.6.1                                ...           4 years ago
  • 4.6.0                                ...           4 years ago
  • 4.5.0                                ...           4 years ago
  • 4.4.0                                ...           4 years ago
  • 4.3.1                                ...           4 years ago
  • 4.3.0                                ...           4 years ago
  • 4.2.0                                ...           5 years ago
  • 4.1.2                                ...           5 years ago
  • 4.1.1                                ...           5 years ago
  • 4.1.0                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 4.0.0-rc-2                                ...           5 years ago
  • 4.0.0-rc-1                                ...           5 years ago
  • 4.0.0-beta.4                                ...           5 years ago
  • 4.0.0-beta.3                                ...           6 years ago
  • 4.0.0-beta.2                                ...           6 years ago
  • 4.0.0-beta.1                                ...           6 years ago
  • 4.0.0-alpha.8                                ...           6 years ago
  • 4.0.0-alpha.7                                ...           7 years ago
  • 4.0.0-alpha.6                                ...           7 years ago
  • 4.0.0-alpha.5                                ...           7 years ago
  • 4.0.0-alpha.4                                ...           7 years ago
  • 4.0.0-alpha.3                                ...           7 years ago
  • 4.0.0-alpha.1                                ...           9 years ago
  • 3.6.0                                ...           9 years ago
  • 3.5.0                                ...           9 years ago
  • 3.4.0                                ...           10 years ago
  • 3.3.0                                ...           10 years ago
  • 3.1.0                                ...           10 years ago
  • 3.0.1                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 3.0.0-beta-3                                ...           10 years ago
  • 3.0.0-beta-2                                ...           10 years ago
  • 3.0.0-beta-1                                ...           10 years ago
  • 2.53.3                                ...           10 years ago
  • 2.53.2                                ...           11 years ago
  • 2.53.1                                ...           11 years ago
  • 2.52.0                                ...           11 years ago
  • 2.48.2                                ...           11 years ago
  • 2.48.1                                ...           11 years ago
  • 2.48.0                                ...           11 years ago
  • 2.47.0                                ...           11 years ago
  • 2.46.1                                ...           11 years ago
  • 2.46.0                                ...           11 years ago
  • 2.45.1                                ...           12 years ago
  • 2.45.0                                ...           12 years ago
  • 2.44.0                                ...           12 years ago
  • 2.43.5                                ...           12 years ago
  • 2.43.4                                ...           12 years ago
  • 2.42.1                                ...           12 years ago
  • 2.42.0                                ...           13 years ago
  • 2.41.0                                ...           13 years ago
  • 2.40.0                                ...           13 years ago
  • 2.39.0                                ...           13 years ago
  • 2.38.1                                ...           13 years ago
  • 2.38.0                                ...           13 years ago
  • 2.37.0                                ...           13 years ago
  • 2.35.2                                ...           13 years ago
  • 2.35.1                                ...           13 years ago
  • 2.35.0                                ...           13 years ago
  • 2.34.1                                ...           13 years ago
  • 2.34.0                                ...           13 years ago
  • 2.33.0                                ...           14 years ago
  • 2.32.1                                ...           14 years ago
  • 2.32.0                                ...           14 years ago
  • 2.31.0                                ...           14 years ago
  • 2.30.0                                ...           14 years ago
  • 2.29.1                                ...           14 years ago
  • 2.29.0                                ...           14 years ago
Downloads
Total 515
Today 0
This Week 5
This Month 338
Last Day 1
Last Week 5
Last Month 84
Dependencies (4)
Dev Dependencies (21)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE