Re: [wtr-general] Watir simple field recorder
On Fri, Apr 1, 2011 at 7:26 PM, Babitha babitha.augus...@gmail.com wrote: I could share this script if anybody was interested. But, I am not sure where I can upload it. You will find that Watir community does not like recorders. You can upload it on your site, github, or you can take over watir recorder project at openqa.org. Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host viaqa.mobi conference on software testing - organizer -- 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
[wtr-general] Watir simple field recorder
There was a ruby watir recorder written by Scott Hanselman(of Microsoft of course) a long time back. It was a full fledged recorder and like other recorders had the issue that the code generated couldn't be reusable. I made some small modifications to this so that it identifies the element IDs and wraps the element as a property in a module. Basically the format of the code generated would be as folows: module MyPage def first_name $browser.text_field(:id, FirstName) end def first_name $browser.text_field(:id, FirstName) end end -- 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
[wtr-general] Watir simple field recorder
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