Ruby language bindings for Selenium WebDriver. Selenium automates browsers for testing and web-based task automation.
Supports MRI >= 3.3.
gem install selenium-webdriver
require "selenium-webdriver" driver = Selenium::WebDriver.for :chrome begin driver.get "https://www.selenium.dev" puts driver.title ensure driver.quit end
Selenium Manager automatically handles browser driver installation — no manual driver setup required.
To try unreleased changes from another project:
selenium checkout./go rb:local_dev (go.bat rb:local_dev on Windows); rerun it after pulling changesPoint 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.