tree: 1a3eacc5149edd901f7ad4a669783e5a22f387d1 [search]
  1. lib/
  2. sig/
  3. spec/
  4. support/
  5. .rubocop.yml
  6. .ruby-version
  7. AGENTS.md
  8. BUILD.bazel
  9. CHANGES
  10. Gemfile
  11. Gemfile.lock
  12. Rakefile
  13. rbs_collection.lock.yaml
  14. rbs_collection.yaml
  15. README.md
  16. selenium-devtools.gemspec
  17. selenium-webdriver.gemspec
  18. Steepfile
  19. TESTING.md
  20. version.bzl
rb/README.md

selenium-webdriver

Ruby language bindings for Selenium 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

Using a Local Checkout

To try unreleased changes from another project:

  1. Install Bazelisk and the other build requirements
  2. Navigate to the root of your selenium checkout
  3. Run ./go rb:local_dev (go.bat rb:local_dev on 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 via GitHub pull requests. See the source code for this binding.

Links

License

Licensed under the Apache License 2.0.