Hello Babitha, I would be interested in see your version of the Watir recorder. On a new project, creating a GUI map is one of the first things that we do after initial prototyping.
I will respond directly to you with my email address. Thanks, Darryl On Apr 1, 1:26 pm, Babitha <babitha.augus...@gmail.com> wrote: > A long time back, Scott Hanselman of microsoft had posted a ruby watir > recorder in his blog. Like most other recorders, this had the problem > that the code generated couldn't be reused. > > I made some small tweaking to this code so that when a user traverses > through the page, clicking on each element that he wants to record, it > records all the elements in the Watir format and gives back a nice > module with properties defined for each element. > > As a sample say you have a page with two fields FirstName and > LastName. > > The recorded output will be something like below: > > module MyPage > def first_name > $browser.text_field(:id, "FirstName") > end > > def last_name > $browser.text_field(:id, "LastName) > end > end > > Now just add this module to your test cases and use first_name, > last_name etc directly without bothering about the identification of > IDs. > > I could share this script if anybody was interested. But, I am not > sure where I can upload it. > > Thanks, > Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com