Permalink
Browse files

use ole_object.invoke('type') instead of ole_object.type to avoid war…

…nings in Ruby 1.8
  • Loading branch information...
jarmo committed Jan 9, 2012
1 parent 684286e commit 9bdf633c53caf1bf47a11c57cded7b3cdcefa6bc
Showing with 2 additions and 2 deletions.
  1. +1 −1 watir/lib/watir/element.rb
  2. +1 −1 watir/lib/watir/locator.rb
@@ -144,7 +144,7 @@ def to_subtype
if tag == "html"
html_element(:ole_object, ole_object)
elsif tag == "input"
- self.send(ole_object.type, :ole_object, ole_object)
+ self.send(ole_object.invoke('type'), :ole_object, ole_object)
elsif tag == "select"
self.select_list(:ole_object, ole_object)
else
@@ -82,7 +82,7 @@ def locate_elements_by_xpath_css_ole
end
def type_matches?(el)
- @tag == "*" || (@tag && el.nodeName.downcase == @tag.downcase) || (@tags && (@tags.include?(el.tagname) || @tags.include?(el.type)))
+ @tag == "*" || (@tag && el.nodeName.downcase == @tag.downcase) || (@tags && (@tags.include?(el.tagname) || @tags.include?(el.invoke('type'))))
end
def create_element ole_object

0 comments on commit 9bdf633

Please sign in to comment.