I feel obligated to point out one thing here:

Per the current (and the earliest of) HTML standards, values for "id"
attributes are supposed to be UNIQUE within a document(page).

"id=name
  Define a reference name for the tag that is UNIQUE in the
document."  (emphasis mine)

There are parts of Watir (identifying objects by ID value) and other
tools and perhaps even browsers that expect pages to adhere to the
HTML standard and will not function correctly if the page violates the
standards and contains 'invalid HTML' such as this.

You should file a bug to inform the appropriate parties that the web
pages are violating HTML standards by using the same 'ID' attribute
values repeatedly within the same document.

'class' and many other attributes can appear as many times, with
identical values, as you want.. the restriction to 'uniqueness'
applies only to the 'id' attribute so far as I know.


On May 6, 7:58 am, tjp <kris...@gmail.com> wrote:
> First off, apologies if I'm in the wrong group. Although I think I'm
> in the right place. I have the following html
>
> <td id="zippy">One</td>
> <td id="zippy">Two</td>
> <td id="zippy">Three</td>
>
> .//*...@id='zippy']/@class is what xPath gives me for every one of
> those. How do I refer to the third one? I tried using
> ff.contains_text("One") and it gave me an index that was huge (1043)
> but couldn't translate that into anything.
>
> Advice on a solution, where to find a solution (I've searched the API)
> or otherwise is appreciated.
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to