Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
use ole_object.invoke('type') instead of ole_object.type to avoid war…
Browse files Browse the repository at this point in the history
…nings in Ruby 1.8
  • Loading branch information
jarmo committed Jan 9, 2012
1 parent 684286e commit 9bdf633
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion watir/lib/watir/element.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def to_subtype
if tag == "html" if tag == "html"
html_element(:ole_object, ole_object) html_element(:ole_object, ole_object)
elsif tag == "input" 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" elsif tag == "select"
self.select_list(:ole_object, ole_object) self.select_list(:ole_object, ole_object)
else else
Expand Down
2 changes: 1 addition & 1 deletion watir/lib/watir/locator.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def locate_elements_by_xpath_css_ole
end end


def type_matches?(el) 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 end


def create_element ole_object def create_element ole_object
Expand Down

0 comments on commit 9bdf633

Please sign in to comment.