On Dec 15, 10:31 am, bis <bis...@gmail.com> wrote:
> I personally like Taza :) its pretty easy to set up and relatively painless
> to use.https://github.com/hammernight/taza
>
> It does do a lot of the magic of wiring things together for you so you can
> just plug in the objects you want to interact with
> an example of how its used is 
> herehttps://github.com/hammernight/etsy_cucumber_taza_tutorial/
>

bis, Do you recall if there's any place that discusses how to deal
with stuff common to many pages (such as a pulldown menu that's part
of the page header) so that you could define in one place methods to
open a given menu or pick a given item?  (which is what it looks like
that menu method is trying to do.)

I can see in some cases where it might make more sense to do this via
a helper method instead of a page object. However in that instance I'd
suggest passing the helper plain language menu names and embed the
object identification info (id values etc) inside the method.  e.g.
you would call the method something along these lines
'pull_down_menu("File","Open")' (or use symbols instead of strings)
That would seem to be a lot more 'DRY' in that you would not be
repeating id values all over your code.  The method itself will be
more complicated of course but that's why the gods inspired the 'case'
statement to be invented.  The big upside is that it gives you one
place to change if those menu elements get altered and far more
understandable code that makes sense to someone who doesn't have the
page DOM memorized.  I suspect the code would write faster also as you
would not need to go inspect the dom to remind yourself of what
identifier was needed for the elements to open the file menu and pick
open and you are less likely to typo the names as you would be any
weird ID values etc.

-- 
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

Reply via email to