All elements without an id attribute, such as when the element is a child of 
its label, are associated with the first label on the page that has no for 
attribute.

Given the html:

````html
<label>Found <input type="text"></label> 
<label>Lost <input type="text"></label> 
````

The second text field cannot be found by its label text, "Lost", as it appears 
to be associated with the first label's text, "Found".

````ruby
p browser.text_field(:label => /Lost/).exists?
#=> false

p browser.text_field(:index => 1).label
#=> "Found"
````

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-classic/issues/59
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to