{"id":14978784,"url":"https://github.com/giggio/node-chromedriver","last_synced_at":"2025-05-13T19:03:14.408Z","repository":{"id":8848304,"uuid":"10555401","full_name":"giggio/node-chromedriver","owner":"giggio","description":"An installer and wrapper for Chromedriver.","archived":false,"fork":false,"pushed_at":"2025-05-08T04:42:02.000Z","size":865,"stargazers_count":486,"open_issues_count":13,"forks_count":188,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-12T21:04:40.721Z","etag":null,"topics":["chromedriver","javascript","nodejs","selenium","selenium-webdriver"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giggio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"giggio"}},"created_at":"2013-06-07T17:37:35.000Z","updated_at":"2025-05-08T04:42:02.000Z","dependencies_parsed_at":"2023-01-13T15:02:02.026Z","dependency_job_id":"e20e3092-5d5e-4b4c-8b3f-9a6c39b279da","html_url":"https://github.com/giggio/node-chromedriver","commit_stats":{"total_commits":447,"total_committers":103,"mean_commits":4.339805825242719,"dds":0.3780760626398211,"last_synced_commit":"969eff8887fa196619871d55fa404102854a07ca"},"previous_names":[],"tags_count":217,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giggio%2Fnode-chromedriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giggio%2Fnode-chromedriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giggio%2Fnode-chromedriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giggio%2Fnode-chromedriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giggio","download_url":"https://codeload.github.com/giggio/node-chromedriver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010793,"owners_count":21998993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromedriver","javascript","nodejs","selenium","selenium-webdriver"],"created_at":"2024-09-24T13:58:23.885Z","updated_at":"2025-05-13T19:03:14.390Z","avatar_url":"https://github.com/giggio.png","language":"JavaScript","readme":"# ChromeDriver\n\n[![Build app](https://github.com/giggio/node-chromedriver/actions/workflows/build.yml/badge.svg)](https://github.com/giggio/node-chromedriver/actions/workflows/build.yml)\n[![npm](https://img.shields.io/npm/dt/chromedriver.svg)](https://www.npmjs.com/package/chromedriver)\n\nAn NPM wrapper for Selenium [ChromeDriver](https://sites.google.com/chromium.org/driver/).\n\n## Building and Installing\n\n```shell\nnpm install chromedriver\n```\n\nOr grab the source and\n\n```shell\nnode ./install.js\n```\n\nWhat this is really doing is just grabbing a particular \"blessed\" (by\nthis module) version of ChromeDriver. As new versions are released\nand vetted, this module will be updated accordingly.\n\nThe package has been set up to fetch and run ChromeDriver for MacOS (darwin),\nLinux based platforms (as identified by Node.js), and Windows.  If you\nspot any platform weirdness, let us know or send a patch.\n\n## Force download\n\nBy default this package, when installed, will search for an existing\nChromedriver binary in your configured temp directory. If found, and it is the\ncorrect version, it will simply copy it to your node_modules directory. You can\nforce it always download by configuring it:\n\n```shell\nnpm install chromedriver --chromedriver-force-download\n```\n\nOr add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.\n\n```ini\nchromedriver_force_download=true\n```\n\nAnother option is to use PATH variable `CHROMEDRIVER_FORCE_DOWNLOAD`.\n\n```shell\nCHROMEDRIVER_FORCE_DOWNLOAD=true npm install chromedriver\n```\n\n## Custom binaries url\n\nThis allows you to use your own endpoints for metadata and binaries. It is useful in air gapped\nscenarios or if you have download restrictions, such as firewalls.\n\nThis was changed for version 115 and greater\n([see details](https://groups.google.com/g/chromedriver-users/c/clpipqvOGjE)),\nbut implemented in this package starting with version\n`114.0.2`. To see the configuration to prior versions check out this\n[README.md](https://github.com/giggio/node-chromedriver/tree/114.0.1#custom-binaries-url)\nat the latest tag where it was using the legacy urls (`114.0.1`).\n\n### For versions \u003e= 115\n\nThere are two urls that need to be configured, one for metadata and one for binaries.\nThe one for metadata is the \"CDN url\", and the one for binaries is the \"CDN binaries url\".\nSee [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) to understand\nhow these urls work.\n\nNpm config:\n\nFor metadata use `chromedriver_cdnurl`. The default is `https://googlechromelabs.github.io`. You need to either supply the binary download endpoint, or the binaries url config, see bellow.\n\nFor binaries use `chromedriver_cdnbinariesurl`. The default is to search for the download url using\n`$chromedriver_cdnurl/chrome-for-testing/[version].json`, which forms a URL like:\nhttps://googlechromelabs.github.io/chrome-for-testing/122.0.6261.57.json.\n\nThe resulting url will be something like:\nhttps://storage.googleapis.com/chrome-for-testing-public/122.0.6261.57/linux64/chromedriver-linux64.zip.\n\nKeep in mind that this last url is just an example and it might change (as it has happened in the past).\n\n```shell\nnpm install chromedriver --chromedriver_cdnurl=https://npmmirror.com/metadata --chromedriver_cdnbinariesurl=https://npmmirror.com/binaries\n```\n\nOr add these properties to your [`.npmrc`](https://docs.npmjs.com/cli/configuring-npm/npmrc) file:\n\n```ini\nchromedriver_cdnurl=https://npmmirror.com/metadata\nchromedriver_cdnbinariesurl=https://npmmirror.com/binaries\n```\n\nAnother option is to use the environment variables `CHROMEDRIVER_CDNURL` and `CHROMEDRIVER_CDNBINARIESURL`.\n\n```shell\nCHROMEDRIVER_CDNURL=https://npmmirror.com/metadata CHROMEDRIVER_CDNBINARIESURL=https://npmmirror.com/binaries npm install chromedriver\n```\n\n### For versions \u003c 115\n\nThere is one url to both metadata and binaries.\n\nTo use a mirror of the ChromeDriver binaries use npm config property `chromedriver_legacy_cdnurl`.\nDefault is `https://chromedriver.storage.googleapis.com`.\n\n```shell\nnpm install chromedriver --chromedriver_legacy_cdnurl=https://npmmirror.com/mirrors/chromedriver --chromedriver_version=LATEST_114\n```\n\nOr add a property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file:\n\n```ini\nchromedriver_legacy_cdnurl=https://npmmirror.com/mirrors/chromedriver\n```\n\nAnother option is to use the environment variable `CHROMEDRIVER_LEGACY_CDNURL`.\n\n```shell\nCHROMEDRIVER_LEGACY_CDNURL=https://npmmirror.com/mirrors/chromedriver npm install chromedriver --chromedriver_version=LATEST_114\n```\n\n## Custom binaries file\n\nTo get the chromedriver from the filesystem instead of a web request use the npm config property `chromedriver_filepath`.\n\n```shell\nnpm install chromedriver --chromedriver_filepath=/path/to/chromedriver_mac64.zip\n```\n\nOr add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.\n\n```ini\nchromedriver_filepath=/path/to/chromedriver_mac64.zip\n```\n\nAnother option is to use the PATH variable `CHROMEDRIVER_FILEPATH`\n\n```shell\nCHROMEDRIVER_FILEPATH=/path/to/chromedriver_mac64.zip\n```\n\nThis variable can be used to set either a `.zip` file or the binary itself, eg:\n\n```shell\nCHROMEDRIVER_FILEPATH=/bin/chromedriver\n```\n## Installing on RISC-V 64-bit Systems\nChromedriver does not provide an official binary for RISC-V 64-bit architectures. To install on a RISC-V system, you must supply your own Chromedriver binary using the `--chromedriver_filepath` option. For example:\n\n```bash\nnpm install chromedriver --chromedriver_filepath=/path/to/chromedriver\n```\n## Custom download options\n\nInstall through a proxy.\n\n```shell\nnpm config set proxy http://[user:pwd]@domain.tld:port\nnpm config set https-proxy http://[user:pwd]@domain.tld:port\n```\n\nUse different User-Agent.\n\n```shell\nnpm config set user-agent \"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0\"\n```\n\n## Skipping chromedriver download\n\nYou may wish to skip the downloading of the chromedriver binary file, for example if you know for certain that it is already there or if you want to use a system binary and just use this module as an interface to interact with it.\n\nTo achieve this you can use the npm config property `chromedriver_skip_download`.\n\n```shell\nnpm install chromedriver --chromedriver_skip_download=true\n```\n\nOr add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.\n\n```ini\nchromedriver_skip_download=true\n```\n\nAnother option is to use the PATH variable `CHROMEDRIVER_SKIP_DOWNLOAD`\n\n```shell\nCHROMEDRIVER_SKIP_DOWNLOAD=true\n```\n\n## Running\n\n```shell\nbin/chromedriver [arguments]\n```\n\nAnd npm will install a link to the binary in `node_modules/.bin` as\nit is wont to do.\n\n## Running with Selenium WebDriver\n\n```javascript\nrequire('chromedriver');\nvar webdriver = require('selenium-webdriver');\nvar driver = new webdriver.Builder()\n  .forBrowser('chrome')\n  .build();\n```\n\n(Tested for selenium-webdriver version `2.48.2`)\n\nThe path will be added to the process automatically, you don't need to configure it.\nBut you can get it from `require('chromedriver').path` if you want it.\n\n## Running via node\n\nThe package exports a `path` string that contains the path to the\nchromedriver binary/executable.\n\nBelow is an example of using this package via node.\n\n```javascript\nvar childProcess = require('child_process');\nvar chromedriver = require('chromedriver');\nvar binPath = chromedriver.path;\n\nvar childArgs = [\n  'some argument'\n];\n\nchildProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {\n  // handle results\n});\n\n```\n\nYou can also use the start and stop methods:\n\n```javascript\nvar chromedriver = require('chromedriver');\n\nargs = [\n // optional arguments\n];\nchromedriver.start(args);\n// run your tests\nchromedriver.stop();\n\n```\n\nWith the latest version, you can optionally receive a Promise from the `chromedriver.start` function:\n\n```javascript\nvar returnPromise = true;\nchromedriver\n  .start(args, returnPromise)\n  .then(() =\u003e {\n    console.log('chromedriver is ready');\n  });\n```\n\nNote: if your tests are ran asynchronously, chromedriver.stop() will have to be\nexecuted as a callback at the end of your tests\n\n## Versioning\n\nThe NPM package version tracks the version of chromedriver that will be installed,\nwith an additional build number that is used for revisions to the installer.\nYou can use the package version number to install a specific version, or use the\nsetting to a specific version. If there is a new Chromedriver version available which is not yet available as a version of `node-chromedriver`, the npm command `npm run update-chromedriver` in this repository can be used to make the required updates to this module, please submit the change as a PR. To always install the latest version of Chromedriver,\nuse `LATEST` as the version number:\n\n```shell\nnpm install chromedriver --chromedriver_version=LATEST\n```\n\nOr add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.\n\n```ini\nchromedriver_version=LATEST\n```\n\nAnother option is to use env variable `CHROMEDRIVER_VERSION`.\n\n```shell\nCHROMEDRIVER_VERSION=LATEST npm install chromedriver\n```\n\nYou can force the latest release for a specific major version by specifying `LATEST_{VERSION_NUMBER}`:\n\n```shell\nCHROMEDRIVER_VERSION=LATEST_80 npm install chromedriver\n```\n\nYou can also force a different version of chromedriver by replacing `LATEST` with a version number:\n\n```shell\nCHROMEDRIVER_VERSION=75.0.3770.140 npm install chromedriver\n```\n\n## Detect ChromeDriver Version\n\nThe NPM package version may not be always compatible to your Chrome version.\nTo get the chromedriver that corresponds to the version of Chrome installed,\nyou can use the npm config property `detect_chromedriver_version`.\n\n```shell\nnpm install chromedriver --detect_chromedriver_version\n```\n\nOr add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.\n\n```ini\ndetect_chromedriver_version=true\n```\n\nAnother option is to use environment variable `DETECT_CHROMEDRIVER_VERSION`.\n\n```shell\nDETECT_CHROMEDRIVER_VERSION=true npm install chromedriver\n```\n\n**Note:** When the property `detect_chromedriver_version` is provided,\n`chromedriver_version` and `chromedriver_filepath` properties are ignored.\n\n## Include Chromium\n\nIf you don't have Chrome installed, you can check for Chromium version instead by setting the argument `include_chromium` to `true`.\n\n```shell\nnpm install chromedriver --include_chromium\n```\n\nOr add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.\n\n```ini\ninclude_chromium=true\n```\n\nAnother option is to use environment variable `INCLUDE_CHROMIUM`.\n\n```shell\nINCLUDE_CHROMIUM=true npm install chromedriver\n```\n\n**Note:** The property `INCLUDE_CHROMIUM` is ignored if the property `DETECT_CHROMEDRIVER_VERSION` is not used.\n\n## A Note on chromedriver\n\nChromedriver is not a library for NodeJS.\n\nThis is an _NPM wrapper_ and can be used to conveniently make ChromeDriver available.\nIt is not a Node.js wrapper.\n\n## Supported Node.js versions\n\nWe will do our best to support every supported Node.js versions.\nSee [nodejs/Release](https://github.com/nodejs/Release) for\nthe current supported versions. You can also view our\n[build scripts](https://github.com/giggio/node-chromedriver/blob/main/.github/workflows/build.yml#L41) and check the versions there.\n\n## Contributing\n\nQuestions, comments, bug reports, and pull requests are all welcome.  Submit them at\n[the project on GitHub](https://github.com/giggio/node-chromedriver/).\n\nBug reports that include steps-to-reproduce (including code) are the\nbest. Even better, make them in the form of pull requests.\n\nWe have added\n[VS Code Remote support with containers](https://code.visualstudio.com/docs/remote/containers).\nIf you are on Windows, set `git config core.autocrlf input` so you don't get git errors.\n\n## Author\n\n[Giovanni Bassi](https://github.com/giggio), with collaboration from\n[lots of good people](https://github.com/giggio/node-chromedriver/graphs/contributors).\n\nThanks for Obvious and their PhantomJS project for heavy inspiration! Check their project on [Github](https://github.com/Obvious/phantomjs/).\n\n## License\n\nLicensed under the Apache License, Version 2.0.\n","funding_links":["https://patreon.com/giggio"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiggio%2Fnode-chromedriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiggio%2Fnode-chromedriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiggio%2Fnode-chromedriver/lists"}