plugin in rails · QA · selenium · selenium grid · selenium on rails

Selenium On Rails

Getting Started

Selenium on Rails is the name of the Selenium product crafted specifically for Rails
developers and is distributed as a Rails plugin. It has been designed to work seamlessly
with the Rails testing environment and fixtures.

It’s easy to install Selenium on Rails and get started.

1. Install the core Selenium files needed by the plugin:

SAMPLE>gem install selenium

2. Install the Selenium on Rails plugin for a given project:

SAMPLE>ruby  script/plugin install

3. Generate the test directory and a test script:

SAMPLE>ruby script/generate selenium first.rsel

4. Start your Rails server in its test environment:

SAMPLE>ruby script/server -e test

5. Open the Selenium Test Runner in your browser:


If your installation and setup succeeded, you see the Selenium Test Runner in your browser. You should also know that Selenium tests can be run from the command line and integrated into an automated suite of tests, but for demonstration purposes we will use the built-in web interface to execute our tests.


open ‘/’
assert_title ‘Ruby on Rails: Welcome aboard’
Run test in –> http://localhost:3000/selenium

For more reference –>