Skip to content
Browse files

Element#to_subtype returns Element if non-supported tag found

  • Loading branch information...
1 parent 46c03d9 commit b6a32f4cebc4864550da8a8e272561adac956a1c @jarmo jarmo committed Jan 19, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 watir/lib/watir/element.rb
View
4 watir/lib/watir/element.rb
@@ -151,8 +151,10 @@ def to_subtype
self.send(ole_object.invoke('type'), :ole_object, ole_object)
elsif tag == "select"
self.select_list(:ole_object, ole_object)
- else
+ elsif self.respond_to?(tag.downcase)
self.send(tag.downcase, :ole_object, ole_object)
+ else
+ self
end
end

0 comments on commit b6a32f4

Please sign in to comment.
Something went wrong with that request. Please try again.