selenium-webdriver
Ruby language bindings forSelenium WebDriver.
Selenium automates browsers for testing and web-based task automation.
Supports MRI >= 3.3.
Installation
gem install selenium-webdriver
Quick Start
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.
Documentation
-Getting Started -Ruby API Docs -Selenium Manager -Selenium Grid
Using a Local Checkout
To try unreleased changes from another project:
- InstallBazelisk](https://github.com/bazelbuild/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'
Support
Contributing
Contributions are welcome viaGitHub pull requests. See thesource code for this binding.
Links
License
Licensed under theApache License 2.0.