Wednesday, June 10, 2009

Ruby/Watir Keyword Driven Automation Framework Part II.

I'm totally stoked!!!! Ok, so I've been utilizing Carl Nagel's paper as my guide as I endeavor to build an automation framework. My starting point was creating the Application Map, Component Functions, and the Ruby methods that would process the data contained in these files. Currently I only have support for clicking links. This version of my framework does the following:

1. Open IE and navigate to http://www.google.com/
2. Click the "About US" link
3. Click the "Jobs" link

It's still a little rough but hopefully you get the concept. In my next blog I will attempt explain my approach in much more detail, but for now try it out:

1. Install Ruby http://www.ruby-lang.org/en/downloads/
2. Install Watir. http://wtr.rubyforge.org/install.html
3. Download the following framework zip file: http://sites.google.com/site/frameworkfiles/keywordframework/framework.zip?attredirects=0

4. Open command prompt and enter the following:

c:\(enter path to ruby file) ruby testscript1.rb config.txt

Other reference material:

Demystifying Keyword Driven Using Watir http://www.slideshare.net/palilamba/demystifying-keyword-driven-using-watir

Turning CSV into a hash in Rubyhttp://ideaquarium.com/hugoestrada/node/37