Repository navigation
Ruby Development
This page details how to build and test the Ruby code in Selenium.
The CrazyFunBuild runs on a bundled JRuby jar and is based on Rake. Use the 'go' Rake wrapper to run the targets. Unfortunately, rvm sets GEM_HOME and causes trouble for our jruby-complete.jar. If you use rvm, you should disable it (rvm use system) before using the go script.
Since this is just a wrapper for Rake, familiar commands (like go -T to list targets) all work.
Tests will be run with your local Ruby installation, which should be a version >= 1.9.2. Make sure you have bundler and our dependencies installed by running
gem install bundler./go //rb:bundle
After making changes, you need to build the code (this is needed since we depend on other parts of the project):
./go //rb:firefox./go //rb:chrome- etc.
Build results go in the build/rb directory. You can play with your changes in a REPL from there:
cd build/rb && bundle console
Using/requiring the ruby code from rb/lib directly is not recommended.
./go //rb:unit-test |
Run unit tests for WebDriver. |
|---|---|
./go //rb:firefox-test |
Run integration tests for Firefox - replace "firefox" with any driver. |
./go //rb:rc-client-unit-test |
Run unit tests for selenium-client (Se 1.x/RC) |
./go //rb:rc-client-integration-test |
Run integration tests for selenium-client (Se 1.x/RC) |
Try ./go -T | grep //rb to see all the Ruby targets.
You can build the gem with ./go //rb:gem:build, which will place the gem in build/. See ReleasingSelenium for how to make a gem release.
- Make your feature addition or bug fix.
- Add tests for it. This is important so we don't break it in a future version unintentionally.
- Create a patch:
git diff > my-feature.patch - Create a new issue, attach the patch and add the Lang-Ruby label.
This wiki is not where you want to be! Visit the Wiki Home for more useful links
Getting Involved
Triaging Issues
Releasing Selenium
Moved to Official Documentation
Architectural Overview
Automation Atoms
Bot Style Tests
Buck
Continuous Integration
Crazy Fun Build
Design Patterns
Desired Capabilities
Developer Tips
Domain Driven Design
Firefox Driver
Firefox Driver Internals
Focus Stealing On Linux
Frequently Asked Questions
Google Summer Of Code
Grid Platforms
History
HtmlUnitDriver
Internet Explorer Driver
InternetExplorerDriver Internals
LoadableComponent
Logging
Next Steps
PageFactory
PageObjects
Python Bindings
RemoteWebDriver
RemoteWebDriverServer
Roadmap
Ruby Bindings
Ruby Development
Scaling WebDriver
SeIDE Release Notes
Selenium Emulation
Selenium Grid 4
Selenium Help
Shipping Selenium 3
The Team
TLC Meetings
Untrusted SSL Certificates
WebDriver For Mobile Browsers
WebDriverJs
Writing New Drivers
Xpath In WebDriver