I've been playing with watir-webdriver. So far, I'm liking it but one thing 
that drove me a little batty was the behavior described here:

http://watirmelon.com/2011/08/02/watir-webdriver-obselete-element-error/

And it does use 0-based indexing, which is a change from 1.6.2. I think the 
newer, non-webdriver versions of Watir also do 0-based indexing. 

>From what I've seen so far it's pretty stable and it doesn't appear to have 
>any problems with any of the pages I've been experimenting with. 

Is your team eager to try the older selenium or the new webdriver version? One 
possible argument for selenium-webdriver over the old selenium API is that the 
webdriver version of selenium supports multiple element selectors (e.g., 
:class=>'foo', :index=>3). I don't think the old selenium API does that and am 
guessing that this is why xpath is so popular in the selenium world. If I had 
to use selenium I'd choose the webdriver API over the old API for that alone.

And I think that the watir API has advantages over the selenium-webdriver API. 
Two things that struck me (please, someone correct me if I'm getting any of 
this wrong as I'm still in the process of comparison shopping and haven't done 
a lot with selenium):

-The selenium-webdriver API doesn't seem to support getting collections and 
doing something with them (e.g., browser.tables.each...).

-The selenium-webdriver API doesn't seem to support daisy-chaining elements. I 
don't think you can do something like browser.div(:class=>'foo', 
:id=>'bar').text_field(:id, 'baz').text.

I've spent some time recently looking at the webdriver stuff and trying to 
figure out what the tradeoffs are. The new selenium API does seem a lot better 
than the older one. 




________________________________
 From: Lisa Crispin <lisa.cris...@gmail.com>
To: watir-general@googlegroups.com 
Sent: Thursday, December 29, 2011 2:34 PM
Subject: [wtr-general] Upgrading anxiety
 

We have Watir 1.6.2 and Ruby 1.8.6. We have MANY Watir/Test/Unit scripts which 
we (well, I) mainly use to help with exploratory testing, and to verify 
releases. I can't live without these scripts, so I don't want to break them. At 
the same time, I want to try the latest Watir and Webdriver to see if it 
correctly interprets the JS that our new Dojo code has - the version of Watir 
we have can't cope with it, and Canoo WebTest/HtmlUnit also cannot correctly 
interpret it. 

I perused the latest install instructions and info about the later Watir 
releases, and it sounds like our older Watir scripts aren't going to work with 
the later version? Is this true? How much effort is required to fix them? Is 
there a central location with this information that I just haven't found yet?

If I install the latest Ruby and Watir/WebDriver, and our scripts don't work, 
can I back up to the old versions again?

I only spend about 10% of my time doing any sort of coding, so though this 
might all be really obvious to y'all, it is something quite challenging and 
scary for me. I would hate to abandon Watir and the excellent scripts we have, 
but I don't get any support from my team on this. They are keen to try Selenium.

Thanks,
Lisa



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and 
Agile Teams_ (Addison-Wesley 2009)
Contributor to _Beautiful Testing_ (O'Reilly 2009)
http://lisacrispin.com
@lisacrispin on Twitter
http://entaggle.com/lisacrispin

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

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