Re: [wtr-general] Re: Introducing Watirsome

2013-05-19 Thread Alex Rodionov
Yep, I understand. A lot similar does page-object by wrapping elements in own 
classes thus allowing to support both watir-webdriver and selenium-webdriver. 
The point of watirsome is a bit different - it exposes Watir classes so you 
could work with the same old well-known API. That's what I needed.

-- 
Cheerz,
Alex Rodionov


On Sunday, May 19, 2013 at 21:29 , Jarmo Pertman wrote:

> By the way, element class method in test-page is not the same as your 
> tag-based methods. Element in test-page is a method for providing container 
> element - e.g. like "el" in Backbone.js. The method name is "element" because 
> it is framework agnostic - e.g. you can use it with Watir-WebDriver, 
> Selenium-Webdriver, Capybara or with whatever other framework - i'd say 
> that's the real main difference between test-page and Watirsome.
> 
> Jarmo
> 
> On Saturday, May 18, 2013 7:22:18 PM UTC+3, Alex Rodionov wrote:
> > For the record, I have updated Watir readme to include all these libraries.
> > 
> > On Saturday, May 18, 2013 8:19:47 PM UTC+7, Alex Rodionov wrote:
> > > @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.
>  
> watir-general@googlegroups.com (mailto:watir-general@googlegroups.com)
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com 
> (mailto:watir-general+unsubscr...@googlegroups.com)
>  
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Watir General" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/watir-general/7a9os1u67MI/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to 
> watir-general+unsubscr...@googlegroups.com 
> (mailto:watir-general+unsubscr...@googlegroups.com).
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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

[wtr-general] Re: Introducing Watirsome

2013-05-19 Thread Jarmo Pertman
By the way, element class method in test-page is not the same as your 
tag-based methods. Element in test-page is a method for providing container 
element - e.g. like "el" in Backbone.js. The method name is "element" 
because it is framework agnostic - e.g. you can use it with 
Watir-WebDriver, Selenium-Webdriver, Capybara or with whatever other 
framework - i'd say that's the real main difference between test-page and 
Watirsome.

Jarmo

On Saturday, May 18, 2013 7:22:18 PM UTC+3, Alex Rodionov wrote:
>
> For the record, I have updated Watir readme to include all these libraries.
>
> On Saturday, May 18, 2013 8:19:47 PM UTC+7, Alex Rodionov wrote:
>>
>> @Jarmo @Chuck
>>
>> I created this because I've been using 
>> page-objectfor 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), 
>> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.