This brings up an interesting issue that came up yesterday.  We have a new 
front-end designer on staff who was creating some mockups for a new project.  I 
was getting familiar with his code and using watir to navigate around, and 
noticed that of the ~90 divs on the page, only 5-6 have unique (or any) id 
tags.  These unnamed divs make up the primary navigation system for the site.  
There are no images, buttons or tables on the page.
 
So of course, not thinking much into it - I ask if it would be possible for him 
add unique id tags to the major navigational elements (50% of the divs are not 
important to anything other than design).  He replied, saying that adding 
unique ids to all elements would wreak havoc with style sheets, since all of 
these unnamed divs share the same style information.  Also, for Search Engine 
Optimization (SEO), he needs to keep as much unnecessary text off the page as 
possible (although this point is debatable).
 
In this case, where do we go from here?  I completely understand his point, but 
at the same time I would be prevented from automating the majority of the tests 
on the new site.  Of course we don't rely 100% on automation (probably less 
than 50%), but 100% manual testing requires quite more time, and produces many 
fewer test results.
 
I'd be interested to hear solutions, or just comments on the issue - I know it 
has to be fairly common.
 
-- Adam

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Željko Filipin
Sent: Friday, March 16, 2007 8:38 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Click on button which isn't a button


If language changes I would recommend that you ask your developer to add an id 
attribute to div tag. Then you would not have to rely on text. If that is not 
the option, you can try this.

ie.cell(:html, /registration/).click 

or

ie.cell(:html, /registration/).div(:text, //).click
-- 
ZeljkoFilipin.com 
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to