I am a big fan of Ruby, Rails and WATiR, but I could not help get excited by
WATiN. A lightweight
port of WATiR that retains much of the original commands. One of the first
challenges was to take a WATiR test and convert this to WATiN, however this was not a challenge, it
was a breeze. With the recent publication
of the WATiN mappings I thought that it would be really cool to build a simple
web recorder to output C# code that can be easily transferable to either an NUnit
or a VS2005 unit test.
The WATiN web recorder is based on the web
recorder ++ originally written by Scott Handsleman and Rutger Smit. After hooking up to the
sourceforge repository for web recorder++, I got my hands on the code base and
started to play. The first bugs to fix were around the marshalling to the UI
thread which were causing cross threading exceptions. Once, these were fixed
up I moved onto changing the Ruby code to C#, and adding some support for div’s
The WATiN web recorder is still in its infancy and there are a number of
areas where I would like to add richer functionality to the User Experience.
The use of a web recorder is a two part phase. The first is the recording of
the tests that allow the navigation to a particular area, the second stage is
the verification that the expected data and HTML elements are located on the
page. The verification code is hand crafted and this is where I would like to
extend the web recorder so that the verification code can be produced by the tool, helping to save time when creating the tests.
Other functionality that I would like to add :-
- Currently supports additional HTML elements Spans, Divs, Table Cells, add
further support for other elements.
- Refactor the app so that it runs as an IE Plugin.
- Playback features needs adding.
- Refactor the editor to support context sensitive help enhance the interaction.
- Support for IFrames.
- Refactor existing architecture into a M-V-C pattern.
- Create unit tests.
Download the attachment and unzip the file. The contents include an msi installer for the WATiN Web Reocrder++ prototype.