A sample application to help you learn about Selenium and Selenium Grid
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Selenium sample application

This is the sample application I wrote to show how Selenium and Rspec can be used together to test an arbitrary web application. And you can run the tests on remote computers and virtual machines! I wrote two blog posts explaining this stuff, here's the first and here's the second.

This application will help you understand Selenium. Selenium allows you to control web browsers with source code. This application uses selenium to drive a web browser to visit a simple Rack web server, and test it.

Getting started

  • Install ruby on your computer. I recommend rbenv.
  • Clone this repo
git clone git@github.com:LinuxFan2718/selenium_grid_sample.git
cd selenium_grid_sample
  • Install the bundler gem
gem install bundler
  • Install the gems for this application
bundle install
  • Start the thin web server
bundle exec thin start -R server.ru
  • Change to another terminal and run the selenium test suite
bundle exec rspec

You should see a firefox instance pop open, visit http://localhost:3000, and close itself. On the terminal, you should see one test run and pass.

By reading the source code of this application you will see how to use Selenium.