# File watir/ie.rb, line 264 def self._find(how, what) ieTemp = nil IE.each do |ie| window = ie.ie case how when :url ieTemp = window if (what.matches(window.locationURL)) when :title # normal windows explorer shells do not have document # note window.document will fail for "new" browsers begin title = window.locationname title = window.document.title rescue WIN32OLERuntimeError end ieTemp = window if what.matches(title) when :hwnd begin ieTemp = window if what == window.HWND rescue WIN32OLERuntimeError end else raise ArgumentError end end return ieTemp end