Ruby language bindings for Selenium WebDriver. Selenium automates browsers for testing and web-based task automation.
Supports MRI >= 3.3.
gem install selenium-webdriverrequire "selenium-webdriver"
driver = Selenium::WebDriver.for :chrome
begin
driver.get "https://www.selenium.dev"
puts driver.title
ensure
driver.quit
endSelenium Manager automatically handles browser driver installation — no manual driver setup required.
To try unreleased changes from another project:
- Install Bazelisk and the other build requirements
- Navigate to the root of your
seleniumcheckout - Run
./go rb:local_dev(go.bat rb:local_devon Windows); rerun it after pulling changes
Point the project's Gemfile at the checkout:
gem 'selenium-webdriver', path: '/path/to/selenium/rb'Then require local_dev in place of selenium-webdriver, so the atoms, CDP code, and Selenium Manager come from what Bazel built:
require 'selenium/webdriver/local_dev'Contributions are welcome via GitHub pull requests. See the source code for this binding.
Licensed under the Apache License 2.0.