{"id":13586881,"url":"https://github.com/titusfortner/webdrivers","last_synced_at":"2025-05-14T14:02:10.962Z","repository":{"id":37390966,"uuid":"100425035","full_name":"titusfortner/webdrivers","owner":"titusfortner","description":"Keep your Selenium WebDrivers updated automatically","archived":false,"fork":false,"pushed_at":"2024-01-24T16:51:32.000Z","size":423,"stargazers_count":596,"open_issues_count":1,"forks_count":110,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-18T13:29:52.730Z","etag":null,"topics":["hacktoberfest","selenium","webdriver"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/titusfortner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2017-08-15T22:39:53.000Z","updated_at":"2025-03-17T23:15:57.000Z","dependencies_parsed_at":"2024-01-24T17:53:40.584Z","dependency_job_id":"a8af15af-5553-4c06-8250-ad4eb2116c5d","html_url":"https://github.com/titusfortner/webdrivers","commit_stats":{"total_commits":263,"total_committers":36,"mean_commits":7.305555555555555,"dds":0.6197718631178708,"last_synced_commit":"5b3dc29ff5cdb7bec110de949e78184c789ef63a"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titusfortner%2Fwebdrivers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titusfortner%2Fwebdrivers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titusfortner%2Fwebdrivers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titusfortner%2Fwebdrivers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titusfortner","download_url":"https://codeload.github.com/titusfortner/webdrivers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566020,"owners_count":21451223,"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":["hacktoberfest","selenium","webdriver"],"created_at":"2024-08-01T15:05:52.710Z","updated_at":"2025-05-14T14:02:10.918Z","avatar_url":"https://github.com/titusfortner.png","language":"Ruby","readme":"# Webdrivers\n\n[![Gem Version](https://badge.fury.io/rb/webdrivers.svg)](https://badge.fury.io/rb/webdrivers)\n![Tests](https://github.com/titusfortner/webdrivers/workflows/Tests/badge.svg)\n\nRun Selenium tests more easily with automatic installation and updates for all supported webdrivers.\n\n## Update: Future of this Project\n\nWith Google's new [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) project, \nand Selenium's new [Selenium Manager](https://www.selenium.dev/documentation/selenium_manager/) feature, \nwhat is required of this gem has changed.\n\nIf you can update to the latest version of Selenium (4.11+), please do so and stop requiring this gem.\nProvide feedback or raise issues to [Selenium Project](https://github.com/SeleniumHQ/selenium/issues/new/choose)\n\nIf you cannot upgrade to Selenium 4.11, Webdrivers 5.3.0 will continue to support Ruby 2.6+ and Selenium 4.0 - 4.10\n\n**Webdrivers 6.0**\nTo provide support for Selenium 3 and Ruby \u003c 2.6 a 6.0 version is planned. It requires:\n* Creating a `selenium-manager.gem` based off of https://github.com/SeleniumHQ/selenium/pull/12429\n* Re-implementing this gem to wrap `selenium-manager.gem`\n* Ensuring compatible with older versions of Selenium \u0026 Ruby\n\nIf anyone would like to help get Webdrivers 6 working, please let us know.\n\n## Description\n\n`webdrivers` downloads drivers and directs Selenium to use them. Currently supports:\n\n* [chromedriver](http://chromedriver.chromium.org/)\n* [geckodriver](https://github.com/mozilla/geckodriver)\n* [IEDriverServer](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver)\n* [msedgedriver](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/)\n\nWorks on macOS, Linux, Windows, and Windows Subsystem for Linux (WSL) v1 and v2. And do see the browser and OS specific\nnotes at the bottom.\n\n## Usage\n\nIn your Gemfile:\n\n```ruby\ngem 'webdrivers', '~\u003e 5.0', require: false\n```\n\nIn your project:\n\n```ruby\nrequire 'webdrivers'\n```\n\nThe drivers will now be automatically downloaded or updated when you launch a browser\nthrough Selenium.\n\n### Specific Drivers\n\nIf you want webdrivers to only manage specific drivers you can specify one or more as follows:\n\n```ruby\nrequire 'webdrivers/chromedriver'\nrequire 'webdrivers/geckodriver'\nrequire 'webdrivers/iedriver'\nrequire 'webdrivers/edgedriver'\n```\n\n### Download Location\n\nThe default download location is `~/.webdrivers` directory, and this is configurable:\n\n ```ruby\n Webdrivers.install_dir = '/webdrivers/install/dir'\n```\n\nAlternatively, you can define the path via the `WD_INSTALL_DIR` environment\nvariable.\n\n### Version Pinning\n\nIf you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise,\nthe latest (stable) driver will be downloaded and passed to Selenium.\n\n```ruby\n# Chrome\nWebdrivers::Chromedriver.required_version = '2.46'\n\n# Firefox\nWebdrivers::Geckodriver.required_version  = '0.23.0'\n\n# Internet Explorer\nWebdrivers::IEdriver.required_version     = '3.14.0'\n\n# Edge (Chromium)\nWebdrivers::Edgedriver.required_version   = '76.0.183.0'\n```\n\nYou can explicitly trigger the update in your code, but this will happen\nautomatically when the driver is initialized:\n\n```ruby\nWebdrivers::Chromedriver.update\n```\n\n### Caching Drivers\n\nYou can set Webdrivers to only look for updates if the previous check\nwas longer ago than a specified number of seconds.\n\n```ruby\nWebdrivers.cache_time = 86_400 # Default: 86,400 Seconds (24 hours)\n```\n\nAlternatively, you can define this value via the `WD_CACHE_TIME` environment\nvariable. **Only set one to avoid confusion**.\n\n##### Special exception for chromedriver and msedgedriver\n\nCache time will be respected as long as a driver binary exists and the major.minor.build versions of\nthe browser and the driver match. For example, if you update Chrome or Edge to v76.0.123 and its driver is\nstill at v76.0.100, `webdrivers` will ignore the cache time and update the driver to make sure you're\nusing a compatible build version.\n\n### Proxy\n\nIf there is a proxy between you and the Internet then you will need to configure\nthe gem to use the proxy.  You can do this by calling the `configure` method.\n\n````ruby\nWebdrivers.configure do |config|\n  config.proxy_addr = 'myproxy_address.com'\n  config.proxy_port = '8080'\n  config.proxy_user = 'username'\n  config.proxy_pass = 'password'\nend\n````\n\n### `SSL_connect` errors\n\nIf you are getting an error like this (especially common on Windows):\n\n`SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed`\n\nAdd the following to your Gemfile:\n\n```ruby\ngem \"net_http_ssl_fix\"\n```\n\nAdd the following to your code:\n\n````ruby\nrequire 'net_http_ssl_fix'\n````\n\nOther solutions are documented on the RubyGems [website](https://guides.rubygems.org/ssl-certificate-update/).\n\n### Rake tasks\n\nEach driver has its own set of `rake` tasks (with `Railtie` support) that\nyou can call once before executing the tests. These are especially\nuseful if you're running tests in parallel and want to avoid performing\nan update check per thread.\n\nIf you are using Rails default configuration the `webdrivers` gem will only be loaded in the test group\nso you will need to specify the test environment when using the tasks:\n\n```ruby\nRAILS_ENV=test rails webdrivers:chromedriver:update\n```\n\nIf you are not using Rails, you'll need to load them into your Rakefile like this:\n\n```ruby\nrequire 'webdrivers'\nload 'webdrivers/Rakefile'\n```\n\nThe full list of available tasks is:\n\n```bash\n$ bundle exec rake -T\nrake webdrivers:chromedriver:remove           # Force remove chromedriver\nrake webdrivers:chromedriver:update[version]  # Remove and download updated chromedriver if necessary\nrake webdrivers:chromedriver:version          # Print current chromedriver version\nrake webdrivers:edgedriver:remove             # Force remove msedgedriver\nrake webdrivers:edgedriver:update[version]    # Remove and download updated msedgedriver if necessary\nrake webdrivers:edgedriver:version            # Print current msedgedriver version\nrake webdrivers:geckodriver:remove            # Force remove geckodriver\nrake webdrivers:geckodriver:update[version]   # Remove and download updated geckodriver if necessary\nrake webdrivers:geckodriver:version           # Print current geckodriver version\nrake webdrivers:iedriver:remove               # Force remove IEDriverServer\nrake webdrivers:iedriver:update[version]      # Remove and download updated IEDriverServer if necessary\nrake webdrivers:iedriver:version              # Print current IEDriverServer version\n```\n\nThese tasks respect the `WD_INSTALL_DIR`, `WD_CACHE_TIME`, `WD_CHROME_PATH`,\nand `WD_EDGE_CHROME_PATH` environment variables, which can also be passed\nthrough the `rake` command:\n\n```bash\n$ bundle exec rake webdrivers:chromedriver:update[2.46] webdrivers:geckodriver:update[0.24.0] WD_CACHE_TIME=86_400 WD_INSTALL_DIR='my_dir'\n2019-05-20 19:03:01 INFO Webdrivers Updated to chromedriver 2.46.628388\n2019-05-20 19:03:04 INFO Webdrivers Updated to geckodriver 0.24.0\n```\n\nPlease note that these tasks do not use any of the configurations from your\nproject (code) and only respect the `ENV` variables and the version (optional)\npassed to the `rake` tasks.\n\n### Logging\n\nThe logging level can be configured for debugging purpose:\n\n```ruby\nWebdrivers.logger.level = :DEBUG\n```\n\n### Browser \u0026 OS Specific Notes\n\n#### Chrome/Chromium\n\nThe version of `chromedriver` will depend on the version of Chrome you are using it with:\n\n * For versions \u003e= 70, the downloaded version of `chromedriver` will match the installed version of Google Chrome.\n More information [here](http://chromedriver.chromium.org/downloads/version-selection).\n * For versions \u003c=  69, `chromedriver` version 2.41 will be downloaded.\n * For beta versions, you'll have to require the beta version of `chromedriver`\n using `Webdrivers::Chromedriver.required_version`.\n\nThe gem looks for the Chrome/Chromium version that `chromedriver` will use by default.\nYou can override this behavior by providing a path to the browser binary you want to use:\n\n```ruby\nSelenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'\n```\n\nAlternatively, you can define the path via the `WD_CHROME_PATH` environment\nvariable.\n\nThis is also required if Google Chrome is not installed in its\n[default location](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).\n\n#### Chrome on Heroku\n\nFollow the specific instructions [here](https://github.com/titusfortner/webdrivers/wiki/Heroku-buildpack-google-chrome) if you're using `heroku-buildpack-google-chrome`.\n\n#### Microsoft Edge (Chromium)\n\nMicrosoft Edge (Chromium) support was added in v4.1.0. Notes\nfrom the [Chrome/Chromium](https://github.com/titusfortner/webdrivers#chromechromium)\nsection apply to this browser as well.\n\nPlease note that `msedgedriver` requires `selenium-webdriver` v4.\n\n#### WSLv1 support\n\nWhile WSLv1 is not designed to run headful applications like Chrome, it can run exes; as such when found to be running\nin WSL, `webdrivers` will use Chrome on the Windows filesystem.\n\nIt's recommended that you install the new PowerShell (PS7) to avoid [a known issue](https://github.com/microsoft/terminal/issues/367)\nwith the console font being changed when calling the old PowerShell (PS5).\n\n#### WSLv2 support\n\nWebdrivers will detect WSLv2 as running on Linux and use Chrome on the Linux filesystem.\n\nWSLv2 doesn't support connecting to host ports out of the box, so it isn't possible to connect to Chromedriver on\nWindows without extra configurations, see: https://github.com/microsoft/WSL/issues/4619. The simplest way to use \nChromedriver with WSLv2 is to run Chrome headless on Linux.\n\n#### Chrome and Edge on Apple M1 (`arm64`)\n\nIf you're switching from Intel to M1, you'll have to manually delete the existing Intel (`mac64`) driver before the \nM1 (`arm64`) build can be downloaded. Otherwise, you'll get an error: `Bad CPU type in executable - ~/.webdrivers/chromedriver (Errno::E086)`\n\n## Wiki\n\nPlease see the [wiki](https://github.com/titusfortner/webdrivers/wiki)\nfor solutions to commonly reported issues.\n\nJoin us in the `#webdrivers-gem` channel on [Slack](https://seleniumhq.herokuapp.com/)\nif you have any questions.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT),\nsee LICENSE.txt for full details and copyright.\n\n## Contributing\n\nBug reports and pull requests are welcome [on GitHub](https://github.com/titusfortner/webdrivers).\nRun `bundle exec rake` and squash the commits in your PRs.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitusfortner%2Fwebdrivers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitusfortner%2Fwebdrivers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitusfortner%2Fwebdrivers/lists"}