well you can break out those pieces into partials that can called from
anywhere within the site if you take a look here

https://github.com/hammernight/etsy_cucumber_taza_tutorial/tree/9cc97f3efdad70eeb648f4d1a891f34b8640754c/lib/sites/etsy/pages

https://github.com/hammernight/etsy_cucumber_taza_tutorial/blob/9cc97f3efdad70eeb648f4d1a891f34b8640754c/lib/sites/etsy/pages/partials/etsy_header.rb

https://github.com/hammernight/etsy_cucumber_taza_tutorial/blob/9cc97f3efdad70eeb648f4d1a891f34b8640754c/lib/sites/etsy/pages/home_page.rb

essentially you define it as its own page and call it when you need in the
project I am currently working thats how I did it

By the way I am Oscar depending on what email address I respond from it
shows Bis or Oscar even tho i have them all set to Oscar lol i need to
learn2gmail i guess


I have a partials page set up
On Thu, Dec 15, 2011 at 11:23 AM, Chuck van der Linden <[email protected]>wrote:

> On Dec 15, 10:31 am, bis <[email protected]> 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.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]<http://groups.google.com/group/watir-general%[email protected]>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to