@Jarmo @Chuck I created this because I've been using page-object<https://github.com/cheezy/page-object>for more than a year and I didn't know abut test-factory and test-page. It has a bit different API compared to them: test-factory and test-page provide with #element class method, while page-object provides with a range of tag-based methods (#div, #text_field, etc.) I find it much nicer as it is more readable.
I've been contributing to page-object constantly but at some point faced architecture limitations which resulted that it may be easier to create my own library which implements similar API other than modify page-object. So I did just the same. The main idea is to be as close to Watir API as possible (the same locators, method names) + some extra stuff. It's achieved because watirsome is practically a "proxy" to Watir browser. This allowed me to move all element definitions to class methods so it's much easier to support such page classes. Extra stuff includes initializers for page classes and region modules (to support polymorphous page objects<http://p0deje.blogspot.ru/2012/01/polymorphous-page-objects.html>), custom locators which for now is any boolean method Watir::Element responds to. For example: # find first visible text field with label "Username" text_field :username, label: 'Username', visible: true I treat it as an alternative to gems you mentioned which is more suitable for me. On Saturday, May 18, 2013 6:46:25 PM UTC+7, Jarmo Pertman wrote: > > Hi! > > If you're looking something really lightweight, then my gem Test::Page is > the one you're looking for: > https://github.com/jarmo/test-page > > Jarmo > > On Friday, May 17, 2013 11:46:18 PM UTC+3, Chuck van der Linden wrote: >> >> On Monday, May 13, 2013 11:36:12 PM UTC-7, Alex Rodionov wrote: >> >>> Hey guys! >>> >>> I've recently released Watirsome, which is a gem I've been using at work >>> for a long time as an alternative to well known page-object. >>> >>> It's a lot similar to it, but more dynamic and based on watir-webdriver. >>> Thus (at least for now), it works only with it. >>> >>> Anyways, you can take a look at https://github.com/p0deje/watirsome and >>> probably give it a shot! >>> >> >> How is it different from, or would you contrast it with the >> "test-factory" page objects gem? http://rubygems.org/gems/test-factory >> >> just wondering as that is a lightweight, designed for Watir page objects >> gem that I'm using (and so far like very much) >> > -- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
