Ruby\Watir Hangs if the browser is not loaded completely

Hi all,

The watir just hangs up looking for page to download completely.
I want the test suite to continue with next test case if page does not
get downloaded within specified time.

Is there any way by which We can accomplish this?

Help in this regard would be greatly appreciated.

Sample Code:

require ‘watir’
include Watir
@ie = IE.new
#----> The script gets hanged up with below stmt in case browser is not

loaded completely

@ie.goto(‘http://vodafone.in’)
@ie.bring_to_front()
@ie.maximize()

Even the statement below doesn’t work here
@ie.wait(10)

Thanks
Vishwanath U.

I haven’t used that module before. But you could just use a Timeout or
rescue…

http://www.ruby-doc.org/stdlib/libdoc/timeout/rdoc/index.html

Lee J. wrote:

I haven’t used that module before. But you could just use a Timeout or
rescue…

http://www.ruby-doc.org/stdlib/libdoc/timeout/rdoc/index.html

Can U explain a bit more with a sample script or so
Because I didn’t get you how can we bypass a statement which is trying
to wait till infinity until the page gets downloaded completely

Thanks