On 7/12/07, Pallavi Sharma <[EMAIL PROTECTED]> wrote:
Hi Marekj thanks for the quick and informative reply. We are planning to do something very similar to what is stated in ur reply. Encapsulating watir functions from the end user and providing him with a vocab [keywords] to construct his test.
cool, be careful not to hide too much. Watir code is a sufficient abstraction and you can train testers quickly on building tests with Watir code directly rather than building a vocabulary, unless you have a very well developed Domain Model and users are very well versed in expressing themselves syntacticly with it. did u built any object repository with Watir for the framework? Nope. I was building each object as I needed to encapsulate. it was organic growth. When you start writing your own set of abstractions you start getting a big overhead and it may not be worth it. Remember: YAGNI, so just build the simplest thing that makes your job faster and has immediate return on investments, all else is excess inventory to manage. Example: I needed a place to manage clicking on a page to go to the next page, so I built a Page object that basically has a next behaviour implmeneted as a collection of clicks on different buttons possible to go to the next page, like buttons, image and possible names like Continue or Save or Next or whatever. class Page < TestObject def next #implmement clicking until you succeed with watir end end The point was not to test here but to use watir to move from page to page and I didn't want to waste time to find out how Continue, Next, Save button was implmented on the page. I needed to abstract that and just say Page.next Also can anyone tell me the difference between these two lines
for "http://ireland.hotels.com" ie.document.frames.length works and returns value =2 ie.document.getElementsByTagName("frame") this doesn't returns any value.
Returns an object on irb session for me.: irb(main):001:0> require 'watir' => true irb(main):002:0> ie = Watir::IE.attach(:title, "Hotels.com") => #<Watir::IE:0x2d803f4 snip irb(main):004:0> ie.document.frames.length => 2 irb(main):006:0> ie.document.getElementsByTagName("frameset") => #<WIN32OLE:0x2d65590> irb(main):007:0> ie.document.getElementsByTagName("frame") => #<WIN32OLE:0x2d59240> Also what all tags the method doc.all will not support, like in the code
watir.rb they have used .getElementsByTagName for divs, spans, tables etc.. whats the difference there? Please do let me know about it.
don't know what you mean here. --marekj
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general