On 7/12/07, aidy lewis <[EMAIL PROTECTED]> wrote: > Hi, > > I am concerned about hierarchy. In each class I hold methods relating > to a specific HTML page. However, each HTML page does not inherit > another by nature. My dilemma is should I inherit through a sequence > of actions (i.e. a use-case)? A use-case is not OO.
I am not sure what you are asking here, as Watir scripts by their nature are more procedural than O-O. I would subclass my Watir code from TestCase and Mixin common functionality from libraries and modules. If there are any obvious ways to introduce Objects later on, refactor them. Basically if it isn't immediately obvious what class hierarchy you need, don't make one. If you have a lot of page-specific methods, chances are there are a few smells going on, and you are missing an opportunity to DRY up common behaviour into libraries. _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general