On Fri, Oct 12, 2012 at 1:26 AM, Željko Filipin
<zeljko.fili...@gmail.com> wrote:
> On Thu, Oct 11, 2012 at 8:48 PM, Hugh McGowan <colinsda...@gmail.com> wrote:
>> I think picking a page-object gem to support is fine but it's not clear to
>> me that Jeff's gem is the right one.
>
> I know that at Blackbaud/Convio you use watirmark[1]. If there was watirmark
> workshop this year at Austin maybe I would now be recommending it. :)

Maybe that is something we should consider,

>> For example, the one we use is different in some very basic ways. Ours is
>> agnostic to the implementation so we don't care what is driving the "page".
>> We use it for watir, selenium, editing XML files, calling WIN32OLE methods
>> for our own DLLs, etc. For us, it's just an abstraction for grouping getters
>> and setters and keeping the implementation separated from the usage of that
>> implementation.

I think it might be interesting to compare what Hugh's group is doing,
with what my team is doing, and Jarmo's stuff.  I wonder if we could
come up with some common approach that could just be included as part
of watir itself, a built in means to define page objects.

 There's so little to what we are doing I'm not even sure we it would
be worth the effort to make a stand-alone gem out if it.  OTOH I think
it's pretty tightly bound to watir as a result.

We define how to access form elements and such in the page objects.
But since most of what we work with are fairly complicated objects in
their own right (Learning units, Course Proposals, Course Offerings,
Academic Calendars) we also use an approach of Test Objects that
parallel what we are working with in the system under test.  These
objects know how to create themselves using the UI (and eventually we
hope via calling services as well) update, delete etc. (of course when
driving the UI they do all of that via the page objects)

If someone wants to see it (it is somewhat in it's infancy, I'm sure
you will find room for improvements ) you can fork the repro from
https://github.com/rSmart/sambal


> The only thing that I do not like about page-object gem is that it adds it's
> own API on top of the driver.
>
> Examples[2]:
>
> browser.button(:id => 'an_id') # watir
> button(:your_name, :id => 'an_id') # page-object
> keyword :your_name {browser.button(:id => 'an_id')} #watirmark
>
> I really prefer how watirmark does it. But maybe it could be added to
> page-object gem.

That is one of the things we didn't like about page-object as well.
The other problem we seemed to have (and forgive me if I'm not
expressing this right) is that if you wanted to just invoke a standard
watir method on something you could not, that function had to already
be built into the PO version of the thing, or you had to bring it up
as a generic element.  I think there were also challenges with actions
where doing something on a page needed to basically return another
page object as a result.  (Abe could elaborate more clearly on the
things he found difficult)

>
>> Maybe this is a good topic to address in the Watir conference next year -
>> we can have a page-object smackdown!
>
> +1

+1  Even if a compare and contrast and not a 'who is best' (implied by
smackdown) I think it would be worth it

>
> I think this is the next big discussion that we need to have.

+1

>
> Željko
> --
> [1] https://github.com/convio/watirmark
> [2] https://github.com/cheezy/page-object/issues/102#issuecomment-6331222
>
_______________________________________________
Wtr-development mailing list
Wtr-development@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to