lib/watir/modal_dialog.rb in watir-1.6.7 vs lib/watir/modal_dialog.rb in watir-1.7.0.rc1
- old
+ new
@@ -15,11 +15,11 @@
begin
Watir::until_with_timeout do
hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP) # GW_ENABLEDPOPUP = 6
hwnd_modal > 0
end
- rescue TimeOutException
+ rescue Wait::TimeoutError
return nil
end
if hwnd_modal == hwnd || hwnd_modal == 0
hwnd_modal = nil
end
@@ -45,11 +45,11 @@
Watir::until_with_timeout do
title = "#{what} -- Web Page Dialog"
@hwnd, arr = FindWindowEx.call(0, 0, nil, title)
@hwnd > 0
end
- rescue TimeOutException
+ rescue Wait::TimeoutError
raise NoMatchingWindowFoundException,
"Modal Dialog with title #{what} not found. Timeout = #{Watir::IE.attach_timeout}"
end
else
raise ArgumentError, "Title value must be String"
@@ -65,10 +65,10 @@
GetUnknown.call(@hwnd, intPointer)
intArray = intPointer.unpack('L')
intUnknown = intArray.first
intUnknown > 0
end
- rescue TimeOutException => e
+ rescue Wait::TimeoutError => e
raise NoMatchingWindowFoundException,
"Unable to attach to Modal Window #{what.inspect} after #{e.duration} seconds."
end
copy_test_config @parent_container
\ No newline at end of file