Master Branch: Build Status

Develop Branch: Build Status

selenium-connect Code Climate

A stupid simple way to run your Selenium tests on your computer, against a Selenium Grid, or in the cloud (e.g. SauceLabs).

Getting Started

require 'selenium-connect'

SeleniumConnect.configure do |c|
  c.host         = "localhost" #or "grid_ip_address" or "saucelabs"
  c.browser      = "firefox"
end

@driver = SeleniumConnect.start
@driver.get "http://www.google.com"
SeleniumConnect.finish

Helpful bits

Start

If host is set to "localhost" and no jar file is specified, it will run the version of selenium-standalone-server.jar that is bundled with the library (currently 2.33.0). Or, you can specify your own jar if you have one you prefer to use. This is done with c.jar = 'path-to-jar-file'.

If no additional parameters are set, the Selenium Server will be run in the background with logging disabled. If a logging directory is provided (with c.log = 'path-to-log-dir') then 3 output files will be generated:

  • Selenium Server JSON Wire Protocol output (server.log)
  • Browser output (browser.log) -- currently only available for Firefox
  • Test output (SPEC-testname.xml)

This localhost functionality is driven using the Selenium Rake Server Task.

Finish

The finish command issues a quit command to the driver and stops the local server if your host is set to "localhost".

Support

Contributing

This project conforms to the neverstopbuilding/craftsmanship guidelines. Specifically related to the branching model and versioning. Please see the guidelines for details.

Install Dependencies

bundle install

Run the Tests

bundle exec rake build