Détail du package

appium-chromedriver

appium1.4mApache-2.07.0.18

Node.js wrapper around chromedriver.

appium, chrome, android

readme

appium-chromedriver

Release

Node.js wrapper around Chromedriver and Microsoft Edge WebDriver. The Microsoft Edge WebDriver support is since v5.4.0. This wrapper is not used directly in Appium, but rather by various Android drivers to automate Chrome/Chromium-based browsers and web views using Hybrid Mode approach. Check the corresponding driver tutorials to get more details on it.

Note

This package is intended to be used as a helper module for Appium drivers such as UiAutomator2 and appium-chromium-driver. It was not created for standalone usage. Please ensure you know what you are doing before using this package directly.

Note

This package can work with Microsoft Edge WebDriver as well, but the support is limited. For example, automatic downloads do not work for Microsoft Edge WebDriver.

Automatic Chromedriver download on module install

Since version 6.0.0 of this module automatic download of the latest known chromedriver does not happen anymore. The below information is only relevant for older module versions:

Skipping binary installation

By default, upon installation the package downloads the most recent known Chromedriver version from Chromedriver CDN server: http://chromedriver.storage.googleapis.com. If, for some reason, you want to install the package without downloading the Chromedriver binary set the APPIUM_SKIP_CHROMEDRIVER_INSTALL environment variable:

APPIUM_SKIP_CHROMEDRIVER_INSTALL=1 npm install appium-chromedriver

Custom Chromedriver version

By default, the package uses the most recent known Chromedriver version. The full list of known Chromedriver versions and their corresponding supported Chrome version could be found in mapping.json

To download a custom version of Chromedriver, please set CHROMEDRIVER_VERSION environment variable:

CHROMEDRIVER_VERSION=107.0.5304.62 npm install appium-chromedriver

Custom binaries url

If you want Chromedriver to be downloaded from another CDN, which differs from the default one https://chromedriver.storage.googleapis.com, then set the new URL to the CHROMEDRIVER_CDNURL environment variable:

CHROMEDRIVER_CDNURL=http://npm.taobao.org/mirrors/chromedriver npm install appium-chromedriver

If you want automatic chromedrivers download feature to work with a custom CDN URL then make sure the server returns a proper list of stored drivers in response to requests having Accept: application/xml header. An example XML could be retrieved from the original URL using curl -H 'Accept: application/xml' https://chromedriver.storage.googleapis.com command.

Since version 5.6 the second environment variable has been added: CHROMELABS_URL. By default, it points to https://googlechromelabs.github.io, and is expected to contain the actual prefix of Chrome for Testing availability JSON API. This API allows retrieval of chromedrivers whose major versions are greater than 114.

Similarly to the above it could be also defined in the .npmrc file:

chromelabs_url=https://googlechromelabs.github.io

You may also want to skip checking for older Chromedriver versions by providing an empty value to the CHROMEDRIVER_CDNURL variable.

Usage

import Chromedriver from 'appium-chromedriver';

// 'sync'-like await/Promise usage
async function runSession() {
    let driver = new Chromedriver();
    const desiredCaps = {browserName: 'chrome'};
    await driver.start(desiredCaps);
    let status = await driver.sendCommand('/status', 'GET');
    await driver.stop();
}

// EventEmitter usage
function runSession2() {
    let driver = new Chromedriver();
    const desiredCaps = {browserName: 'chrome'};
    driver.start(desiredCaps);
    driver.on(Chromedriver.EVENT_CHANGED, function (msg) {
        if (msg.state === Chromedriver.STATE_ONLINE) {
            driver.sendCommand('/status', 'GET').then(function (status) {
                driver.stop();
            });
        }
    });
    driver.on(Chromedriver.EVENT_ERROR, function (err) {
        // :-(
    });
}

States

Here's what the Chromedriver state machine looks like:

Chromedriver States

Here are the events you can listen for:

  • Chromedriver.EVENT_ERROR: gives you an error object
  • Chromedriver.EVENT_CHANGED: gives you a state change object, with a state property that can be one of:
    • Chromedriver.STATE_STOPPED
    • Chromedriver.STATE_STARTING
    • Chromedriver.STATE_ONLINE
    • Chromedriver.STATE_STOPPING
    • Chromedriver.STATE_RESTARTING

Development

Build & Lint

npm run build
npm run lint

Run Tests

npm run test
npm run e2e-test

changelog

7.0.18 (2025-04-30)

Miscellaneous Chores

7.0.17 (2025-04-24)

Miscellaneous Chores

  • ChromeDriver Bump to v135.0.7049.114 (#474) (38c4959)

7.0.16 (2025-04-23)

Miscellaneous Chores

7.0.15 (2025-04-16)

Miscellaneous Chores

7.0.14 (2025-04-09)

Miscellaneous Chores

7.0.13 (2025-04-02)

Miscellaneous Chores

7.0.12 (2025-03-25)

Miscellaneous Chores

  • deps-dev: bump sinon from 19.0.5 to 20.0.0 (#468) (f3774be)

7.0.11 (2025-03-22)

Miscellaneous Chores

  • ChromeDriver Bump to v134.0.6998.165 (#467) (1c6add6)

7.0.10 (2025-03-20)

Miscellaneous Chores

7.0.9 (2025-03-11)

Miscellaneous Chores

7.0.8 (2025-03-05)

Miscellaneous Chores

7.0.7 (2025-02-26)

Miscellaneous Chores

  • ChromeDriver Bump to v133.0.6943.141 (#463) (227ee2a)

7.0.6 (2025-02-21)

Bug Fixes

7.0.5 (2025-02-21)

Miscellaneous Chores

  • ChromeDriver Bump to v133.0.6943.126 (#461) (0a01697)

7.0.4 (2025-02-20)

Miscellaneous Chores

7.0.3 (2025-02-13)

Miscellaneous Chores

7.0.2 (2025-02-05)

Miscellaneous Chores

7.0.1 (2025-01-29)

Miscellaneous Chores

  • ChromeDriver Bump to v132.0.6834.159 (#457) (86fa246)

7.0.0 (2025-01-24)

⚠ BREAKING CHANGES

  • The detectWebDriverProtocol method of the Chromedriver class has been removed
  • The desiredProtocol property of the Chromedriver class has been renamed to _desiredProtocol
  • The driverVersion property of the Chromedriver has been changed to a getter

Features

  • Determine chromedriver version from the /status API output (#456) (797c8cc)

6.1.16 (2025-01-23)

Miscellaneous Chores

  • ChromeDriver Bump to v132.0.6834.110 (#454) (152a416)

6.1.15 (2025-01-15)

Miscellaneous Chores

6.1.14 (2025-01-08)

Miscellaneous Chores

  • ChromeDriver Bump to v131.0.6778.264 (#452) (60948b7)

6.1.13 (2025-01-06)

Miscellaneous Chores

  • deps-dev: bump @appium/eslint-config-appium-ts from 0.3.3 to 1.0.1 (#451) (ccbd1b9)

6.1.12 (2024-12-19)

Miscellaneous Chores

  • ChromeDriver Bump to v131.0.6778.204 (#450) (fb89c06)

6.1.11 (2024-12-12)

Miscellaneous Chores

  • Replace occurrences of the deprecated errorAndThrow API (#449) (010ef76)

6.1.10 (2024-12-11)

Miscellaneous Chores

  • ChromeDriver Bump to v131.0.6778.108 (#448) (1de23ab)

6.1.9 (2024-12-06)

Miscellaneous Chores

  • deps: bump @appium/support from 5.1.8 to 6.0.0 (#447) (f52a1d8)

6.1.8 (2024-12-04)

Miscellaneous Chores

6.1.7 (2024-12-03)

Miscellaneous Chores

  • deps-dev: bump mocha from 10.8.2 to 11.0.1 (#445) (ba8af98)

6.1.6 (2024-11-20)

Miscellaneous Chores

6.1.5 (2024-11-13)

Miscellaneous Chores

6.1.4 (2024-11-07)

Miscellaneous Chores

  • ChromeDriver Bump to v130.0.6723.116 (#442) (83a32f0)

6.1.3 (2024-11-06)

Miscellaneous Chores

6.1.2 (2024-10-30)

Miscellaneous Chores

6.1.1 (2024-10-23)

Miscellaneous Chores

6.1.0 (2024-10-22)

Features

6.0.8 (2024-10-16)

Miscellaneous Chores

6.0.7 (2024-10-10)

Miscellaneous Chores

  • ChromeDriver Bump to v129.0.6668.100 (#436) (267c9d1)

6.0.6 (2024-10-09)

Miscellaneous Chores

6.0.5 (2024-10-03)

Miscellaneous Chores

6.0.4 (2024-10-02)

Miscellaneous Chores

6.0.3 (2024-09-25)

Miscellaneous Chores

6.0.2 (2024-09-18)

Miscellaneous Chores

6.0.1 (2024-09-16)

Bug Fixes

6.0.0 (2024-09-16)

⚠ BREAKING CHANGES

  • Latest chromedriver binary does not get downloaded automatically anymore upon module installation

Features

  • Remove automatic download of the latest chromedriver upon install (#430) (ee7940d)

5.6.78 (2024-09-14)

Miscellaneous Chores

  • ChromeDriver Bump to v128.0.6613.137 (#429) (6378dd4)

5.6.77 (2024-09-13)

Miscellaneous Chores

  • deps-dev: bump sinon from 18.0.1 to 19.0.1 (#427) (0586a23)

5.6.76 (2024-09-13)

Bug Fixes

5.6.75 (2024-09-03)

Miscellaneous Chores

  • ChromeDriver Bump to v128.0.6613.119 (#426) (424ed37)

5.6.74 (2024-08-31)

Bug Fixes

5.6.73 (2024-08-29)

Miscellaneous Chores

5.6.72 (2024-08-22)

Miscellaneous Chores

5.6.71 (2024-08-15)

Miscellaneous Chores

  • ChromeDriver Bump to v127.0.6533.119 (#421) (8c293cc)

5.6.70 (2024-08-07)

Miscellaneous Chores

5.6.69 (2024-08-02)

Miscellaneous Chores

  • Replace fancy-log dependency with appium logger (#419) (7faf923)

5.6.68 (2024-07-31)

Miscellaneous Chores

5.6.67 (2024-07-29)

Miscellaneous Chores

  • deps-dev: bump @types/node from 20.14.13 to 22.0.0 (#417) (2cc72b7)

5.6.66 (2024-07-24)

Miscellaneous Chores

5.6.65 (2024-07-20)

Miscellaneous Chores

5.6.64 (2024-07-17)

Miscellaneous Chores

  • ChromeDriver Bump to v126.0.6478.182 (#414) (192418c)

5.6.63 (2024-07-10)

Miscellaneous Chores

  • deps-dev: bump sinon from 17.0.2 to 18.0.0 (#411) (f63d99b)
  • deps: bump @appium/support from 4.5.0 to 5.1.1 (#412) (19c6e2b)

5.6.62 (2024-06-25)

Miscellaneous Chores

  • ChromeDriver Bump to v126.0.6478.126 (#408) (4541c41)

5.6.61 (2024-06-22)

Miscellaneous Chores

5.6.60 (2024-06-21)

Miscellaneous Chores

5.6.59 (2024-06-19)

Miscellaneous Chores

5.6.58 (2024-06-14)

Miscellaneous Chores

5.6.57 (2024-06-12)

Miscellaneous Chores

5.6.56 (2024-06-04)

Miscellaneous Chores

  • bump semantic-release from 23.1.1 to 24.0.0 and conventional-changelog-conventionalcommits to 8.0.0 (#402) (dc30918)

5.6.55 (2024-05-31)

Miscellaneous Chores

  • ChromeDriver Bump to v125.0.6422.141 (#401) (294c0a5)

5.6.54 (2024-05-25)

Miscellaneous Chores

5.6.53 (2024-05-24)

Miscellaneous Chores

  • Improve the error message about download servers unavailability (#399) (6eba27d)

5.6.52 (2024-05-22)

Miscellaneous Chores

5.6.51 (2024-05-16)

Miscellaneous Chores

  • Update dev dependencies (b8ac0e2)

5.6.50 (2024-05-16)

Miscellaneous Chores

5.6.49 (2024-05-14)

Miscellaneous Chores

  • ChromeDriver Bump to v124.0.6367.207 (#395) (fe675a3)

5.6.48 (2024-05-10)

Miscellaneous Chores

  • ChromeDriver Bump to v124.0.6367.201 (#394) (02adc74)

5.6.47 (2024-05-08)

Miscellaneous Chores

  • ChromeDriver Bump to v124.0.6367.155 (#392) (c2a08cf)

5.6.46 (2024-04-26)

Miscellaneous Chores

5.6.45 (2024-04-24)

Miscellaneous Chores

5.6.44 (2024-04-23)

Miscellaneous Chores

5.6.43 (2024-04-11)

Miscellaneous Chores

  • ChromeDriver Bump to v123.0.6312.122 (#388) (3d0d997)

5.6.42 (2024-04-05)

Miscellaneous Chores

  • ChromeDriver Bump to v123.0.6312.105 (#387) (724efff)

5.6.41 (2024-03-27)

Miscellaneous Chores

5.6.40 (2024-03-20)

Miscellaneous Chores

5.6.39 (2024-03-13)

Miscellaneous Chores

  • ChromeDriver Bump to v122.0.6261.128 (#384) (5231056)

5.6.38 (2024-03-08)

Bug Fixes

  • respect executableDir even non-adb environment such as desktop (#383) (0a3e80e)

5.6.37 (2024-03-08)

Miscellaneous Chores

  • ChromeDriver Bump to v122.0.6261.111 (#382) (03d4b97)

5.6.36 (2024-03-07)

Miscellaneous Chores

5.6.35 (2024-02-28)

Miscellaneous Chores

5.6.34 (2024-02-23)

Miscellaneous Chores

5.6.33 (2024-02-21)

Miscellaneous Chores

5.6.32 (2024-02-17)

Miscellaneous Chores

  • ChromeDriver Bump to v121.0.6167.184 (#377) (8c49e74)

5.6.31 (2024-01-27)

Miscellaneous Chores

5.6.30 (2024-01-24)

Miscellaneous Chores

5.6.29 (2024-01-17)

Miscellaneous Chores

  • deps-dev: bump semantic-release from 22.0.12 to 23.0.0 (#370) (3bafbe2)
  • use latest lts for the publishment (e7843b8)

5.6.28 (2024-01-13)

Miscellaneous Chores

5.6.27 (2023-12-19)

Miscellaneous Chores

  • ChromeDriver Bump to v120.0.6099.109 (#367) (3dfe443)

5.6.26 (2023-12-07)

Miscellaneous Chores

5.6.25 (2023-12-06)

Miscellaneous Chores

5.6.24 (2023-11-10)

Bug Fixes

  • start session should return caps that chromedriver returns (#362) (499f65e)

5.6.23 (2023-11-06)

Miscellaneous Chores

  • deps-dev: bump @types/sinon from 10.0.20 to 17.0.0 (#361) (b8f2ad4)

5.6.22 (2023-11-01)

Miscellaneous Chores

  • deps: bump asyncbox from 2.9.4 to 3.0.0 (#360) (8e1e758)

5.6.21 (2023-11-01)

Miscellaneous Chores

  • ChromeDriver Bump to v119.0.6045.105 (#359) (5c6b844)

5.6.20 (2023-10-25)

Miscellaneous Chores

  • deps-dev: bump typescript from 5.1.6 to 5.2.2 (#342) (49f812e)

5.6.19 (2023-10-24)

Miscellaneous Chores

  • deps-dev: bump sinon from 16.1.3 to 17.0.0 (#358) (56c704c)

5.6.18 (2023-10-19)

Miscellaneous Chores

  • deps-dev: bump eslint-config-prettier from 8.10.0 to 9.0.0 (#357) (1150b10)
  • deps-dev: bump semantic-release from 21.1.2 to 22.0.5 (#350) (37c4bda)

5.6.17 (2023-10-19)

Miscellaneous Chores

5.6.16 (2023-10-19)

Miscellaneous Chores

  • deps: bump appium-adb from 10.0.0 to 11.0.1 (#356) (91f017f)

5.6.15 (2023-10-19)

Miscellaneous Chores

  • deps-dev: bump lint-staged from 14.0.1 to 15.0.2 (#355) (5635081)

5.6.14 (2023-10-17)

Miscellaneous Chores

  • deps: bump appium-adb from 9.14.12 to 10.0.0 (#354) (4673860)

5.6.13 (2023-10-11)

Miscellaneous Chores

5.6.12 (2023-10-05)

Miscellaneous Chores

  • ChromeDriver Bump to v117.0.5938.149 (#351) (45e30fd)

5.6.11 (2023-09-22)

Miscellaneous Chores

5.6.10 (2023-09-17)

Miscellaneous Chores

  • ChromeDriver Bump to v117.0.5938.88 (#346) (6bb28e0)
  • deps-dev: bump sinon from 15.2.0 to 16.0.0 (27c1b93)

5.6.9 (2023-09-13)

Miscellaneous Chores

5.6.8 (2023-08-30)

Miscellaneous Chores

  • Remove the obsolete babel dependency (06b56b9)

5.6.7 (2023-08-28)

Miscellaneous Chores

  • deps-dev: bump conventional-changelog-conventionalcommits from 6.1.0 to 7.0.1 (#343) (b19ce6b)

5.6.6 (2023-08-25)

Miscellaneous Chores

  • deps-dev: bump semantic-release from 20.1.3 to 21.1.0 (#341) (cc0ac76)

5.6.5 (2023-08-18)

Bug Fixes

Miscellaneous Chores

  • deps-dev: bump typescript from 5.0.4 to 5.1.6 (#326) (2564927)

5.6.4 (2023-08-16)

Miscellaneous Chores

5.6.3 (2023-08-14)

Miscellaneous Chores

  • deps-dev: bump lint-staged from 13.3.0 to 14.0.0 (#337) (e66eb8e)

5.6.2 (2023-08-03)

Miscellaneous Chores

  • ChromeDriver Bump to v115.0.5790.170 (#336) (de13349)

5.6.1 (2023-07-29)

Miscellaneous Chores

  • ChromeDriver Bump to v115.0.5790.102 (#335) (4d118e3)

5.6.0 (2023-07-29)

Features

  • Add support of the new chromedriver storage (#333) (10a1a5b)

5.5.3 (2023-07-28)

Miscellaneous Chores

  • deps-dev: bump @appium/tsconfig from 0.2.4 to 0.3.0 (#299) (b51aae2)

5.5.2 (2023-07-10)

Miscellaneous Chores

  • deps-dev: bump @types/node from 18.16.19 to 20.4.1 (#331) (62988d3)
  • deps-dev: bump prettier from 2.8.8 to 3.0.0 (#329) (bcd3723)
  • deps: bump compare-versions from 5.0.3 to 6.0.0 (#332) (a87d879)

5.5.1 (2023-06-30)

Bug Fixes

  • types: actually export named Chromedriver (94e79f0)

5.5.0 (2023-06-30)

Features

  • use named export for Chromedriver (811eb46)

Bug Fixes

Miscellaneous Chores

  • vscode: add a default build task (9c4e6a2)

5.4.4 (2023-06-07)

Miscellaneous Chores

  • deps-dev: bump conventional-changelog-conventionalcommits from 5.0.0 to 6.0.0 (#318) (8aaa56d)

5.4.3 (2023-06-02)

Miscellaneous Chores

5.4.2 (2023-05-18)

Miscellaneous Chores

  • deps: bump @appium/support from 3.1.11 to 4.0.0 (#311) (c12156b)

5.4.1 (2023-05-04)

Miscellaneous Chores

5.4.0 (2023-04-13)

Features

  • parse msedge as well as chromedriver (#297) (a71240b)

5.3.4 (2023-04-10)

Miscellaneous Chores

  • deps-dev: bump rimraf from 4.4.1 to 5.0.0 (#298) (3b9d86a)

5.3.3 (2023-04-07)

Miscellaneous Chores

5.3.2 (2023-03-24)

Miscellaneous Chores

  • deps-dev: bump typescript from 4.9.5 to 5.0.2 (#293) (6fd403e)

5.3.1 (2023-03-16)

Bug Fixes

  • install-npm.js fails to run npm run build due to type error (#292) (1e3014b)
  • minBrowserVersion in SyncOption should be a number (#291) (39d8fdd)

Miscellaneous Chores

5.3.0 (2023-02-17)

Features

5.2.17 (2023-02-09)

Miscellaneous Chores

5.2.16 (2023-02-02)

Bug Fixes

  • Update Apple ARM architecture detection (#287) (a10d2d9)

5.2.15 (2023-01-17)

Miscellaneous Chores

  • deps-dev: bump semantic-release from 19.0.5 to 20.0.2 (#284) (0811ef8)

5.2.14 (2023-01-13)

Miscellaneous Chores

  • deps-dev: bump rimraf from 3.0.2 to 4.0.4 (#286) (791c00a)

5.2.13 (2023-01-12)

Miscellaneous Chores

5.2.12 (2022-12-22)

Miscellaneous Chores

  • deps: bump @appium/base-driver from 8.7.3 to 9.1.0 (#283) (b31d0ac)

5.2.11 (2022-12-14)

Miscellaneous Chores

  • deps-dev: bump @appium/test-support from 2.0.2 to 3.0.0 (#281) (bb99b36)
  • deps: bump @appium/support from 2.61.1 to 3.0.0 (#280) (4d1fda9)

5.2.10 (2022-12-01)

Miscellaneous Chores

  • add conventional-changelog-conventionalcommits for changelog generator (f896a79)
  • customize the changelog (#278) (507e3a2)
  • tweak the syntax of releaserc (e37d6d5)

5.2.9 (2022-12-01)

5.2.8 (2022-11-29)

5.2.7 (2022-11-22)

5.2.6 (2022-11-06)