Web application testing in Ruby(Watir) - 2 minutes guide
Watir (pronounced as Water) is a free open source tool which can be used to automate web applications. It is an extension of Ruby programming language. Unlike most of the other testing tools it gains the advantage of powerful features of Ruby and simulate browser interactions in very simple manner. Lets see how a simple google search is automated using Watir in few steps. Pre-requisites Install Ruby (1.8.5-24 or later) Step 1 Install Watir. Open a command window or shell and issue the following commands gem update --system gem install watir The above two commands update gem installer and then install watir in your system. Step 2 Open SciTE ruby editor or notepad and start to create the following script. require "watir" ie = Watir::IE.new ie.goto("http://www.google.com") ie.text_field(:name, "q").set("WSO2 WSAS") ie.button(:name, "btnG").click Step 3 Save the above file as SimpleTest.rb and run it from the command line by typing Simp...