lib/watir/locator.rb in watir-1.9.0 vs lib/watir/locator.rb in watir-1.9.1.rc1

- old
+ new

@@ -192,10 +192,10 @@ the_id = @specifiers[:id] if the_id && the_id.class == String && @specifiers[:index] == 1 && @specifiers.length == 2 @element = @document.getElementById(the_id) rescue nil # Return if our fast match really HAS a matching :id - return true if @element && @element.invoke('id') == the_id + return true if @element && @element.invoke('id') == the_id && @types.include?(@element.getAttribute('type')) end the_name = @specifiers[:name] if the_name && the_name.class == String @elements = @document.getElementsByName(the_name) rescue nil