lib/watir-classic/ie-class.rb in watir-classic-3.4.0 vs lib/watir-classic/ie-class.rb in watir-classic-3.5.0

- old
+ new

@@ -304,13 +304,13 @@ def hwnd raise "Not attached to a browser" if @ie.nil? @hwnd ||= @ie.hwnd end - # @return [Symbol] the name of the browser. Is always :ie. + # @return [Symbol] the name of the browser. Is always :internet_explorer. def name - :ie + :internet_explorer end # @return [Boolean] true when IE is window exists, false otherwise. def exists? !!(@ie.name =~ /Internet Explorer/) @@ -521,10 +521,10 @@ end # Gives focus to the window frame. def focus active_element = document.activeElement - active_element.blur unless active_element.tagName == "BODY" + active_element.blur if active_element && active_element.tagName != "BODY" document.focus end # @private def attach_command