History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-175
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: sufyit
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

buttons.length method doesn't count <button> elements

Created: 24/Sep/07 04:34 PM   Updated: 14/Dec/07 04:06 PM
Component/s: HTML Controls
Affects Version/s: 1.5.0/1.5.1
Fix Version/s: Future

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Watir's buttons.length method doesn't count <button> elements. Below is an example web page and watir code demonstrating the issue:

HTML:
<html>
  <body>
    <button>test</button>
  </body>
</html>



WATIR CODE:

ie.buttons.length
                        #-->0
ie.buttons[1].exists?
                        #-->true

 All   Comments   Work Log   Change History      Sort Order:
Bret Pettichord - 14/Oct/07 12:49 AM
sounds like a bug

Charley Baker - 14/Dec/07 04:06 PM
buttons assumes its an input control with type button, button tags aren't recognized. the downside of this means that you can't iterate through buttons with button tags. The way we deal with buttons needs to be figured out, and might include buttons as we currently support them with buttons - input tags marked with buttons - as well as actual button tags.