Getting started with Ruby and Selenium

I got an email recently asking for info on getting started with Selenium & Ruby.  I replied:

I can offer training with Selenium, but I’d be happy to try to answer specific questions for free.

I’ve written a blog post about using Selenium with Ruby:
https://fijiaaron.wordpress.com/2010/09/29/writing-page-based-tests-with-selenium-in-ruby/

But your best reference is probably the Selenium home page:
http://seleniumhq.org/

You can install Selenium IDE (a Firefox plugin) and experiment with recording tests and then convert them to Ruby.  You’ll need to turn on formats, explained here:
http://blog.reallysimplethoughts.com/2011/06/10/does-selenium-ide-v1-0-11-support-changing-formats/

Here’s an example I created in Selenium IDE:

After checking “Enable Experiemental Features” under the “Options” menu, you can see Ruby code that looks like this:

 

A good introduction on using Selenium with Ruby and RSpec:
http://selenium.rubyforge.org/getting-started.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s