lib/watir/ie-class.rb in watir-1.8.0.rc1 vs lib/watir/ie-class.rb in watir-1.8.0
- old
+ new
@@ -402,14 +402,12 @@
wait rescue nil
chwnd = @ie.hwnd.to_i
@ie.quit
t = Time.now
while exists?
- # just in case to avoid possible endless loop
- if Time.now - t > 10
- puts "Impossible to close all IE windows, continuing."
- break
- end
+ # just in case to avoid possible endless loop if failing to close some
+ # window or tab
+ break if Time.now - t > 10
sleep 0.3
end
end
# Maximize the window (expands to fill the screen)