Watir tips and tricks
A collection of useful tips and tricks for WATIR and RUBY.
Home
Installation
Errors
Tuesday, September 6, 2011
Timeout ...
IE has some problems with e.g. javascripts, where it is loading a page forever without ever timing out. To prevent your test runs from hanging, e.g. create a function for opening URLs:
def openURL url
begin
Timeout::timeout(60) do
$ie.goto url
end
rescue Timeout::Error
puts "Timeout occured! Continuing ..."
end
end
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment