begin
Watir::Waiter.wait_until(20) { $ie.text.include? "Redirected" }
rescue Watir::Exception::TimeOutException
begin
raise "Redirect didn't happen!"
end
Watir::Waiter.wait_until(20) { $ie.text.include? "Redirected" }
rescue Watir::Exception::TimeOutException
begin
raise "Redirect didn't happen!"
end
end
This will wait for maximum 20 seconds for the text 'Redirected' to appear. If it doesn't appear within the timeframe, TimeOutException is raised.
No comments:
Post a Comment