Getting Started with Ruby WebDriver

In this post, we will see on how to get started with writing WebDriver tests with Ruby.
Its very Simple getting started with WebDriver and Ruby.

Installation
Assuming you already have Ruby installed in your machine.
Let’s now, install the Ruby WebDriver gem file.

Official GEM page for the WebDriver Ruby Bindings

With that the installation part is over, now we will move on writing a sample test.

For Ruby there is no any specific IDE, that I would recommend and it can just be written in any TextEditor’s
like Notepad++ in Windows and TextWrangler or TextEdit or Xcode in Mac

Programming
Here is a sample program,

Execution
To execute the above program, all you have to just do is

Note: Here my ruby program name was MyFirstRubySeleniumProgram and hence used ruby MyFirstRubySeleniumProgram.rb

Generally it should be

With that the Getting Started with Ruby WebDriver is completed and I hope its pretty easy for newbies to get started with Ruby WebDriver.

A quick Cheat Sheet of Ruby WebDriver commands,

Click

Type

Select

VerifyElementPresent

WaitForElementPresent

CheckBox

Hope it helps!! Happy learning Ruby!!

Leave a Comment

*