The following will guide you on how to install Watir and other related components in a way that will help you achieve fast and data driven development of Watir Scripts. All things written below are already available on the internet. I just consolidated them in one post:
OS:Windows Vista
Browser: IE 7
- Install Ruby
- Install Watir Library
1. Go to the command prompt
2. Type the following command:
gem install Watir
- Install a database Driver
1. Go to the command prompt
2. Type the following command:
gem install sequel
3. Follow the instructions.
For MySQL database, you can use the Ruby/MySQL driver which can be installed as follows:
1. Download the latest version of Ruby/MySQL from this page
2. Extract the zipped file ruby-mysql-0.2.6.tar.gz
3. Run the following command from within the extracted folder.:
ruby setup.rb
4. Follow the instructions.
- Install WatirRecorder++
WatirRecorder++ is not essential to develop Watir scripts, but it substantially saves the time needed to develop scripts. Watir Ruby scripts can be written manually, which means that the automation developer needs to write user actions one by one. This can be time consuming, so WatirRecorder++ can help. It is also a free windows application, which was developed by Scott Hanselman, an engineer at Microsoft. It listens to user actions in Internet Explorer and converts them into Watir Ruby scripts
You can download WatirRecorder++ here:
Once installed, you can start using it immediately and it’s very easy to use and self explanatory. Just fire the recorder and Internet explorer will start listening to your actions and converting them to a ruby script in real time.
- Install IE Developer ToolBar
You can download IE Toolbar here:
Now you're ready to begin automating your tests with ruby.


