Forum: Ruby Increase Default TimeOut in WATIR

Posted by Manav Gupta (manavkbgupta)
on 2013-01-18 07:26
hi,
I have been sing WATiR for quite a time. Right now I m working with a
remote system and because of VPN access the pages take long time to
load. I wish to increase WATiR's default waiting time to a user define
seconds. Can any one help me out.

During debuggin my script I came across timeout.rb in Ruby/1.8
directory. Can any one suggest if I need to make changes in this file or
some other file. Or if I can include some timeout module and set it to
my desired value or if there is some global variable that i can set.


Thanks & Regards,
Manav
Bahngalore
Posted by Joel Pearson (virtuoso)
on 2013-01-18 22:03
I'm not sure about Watir, but using webdriver you just change the 
underlying driver's timeout:

@client = Selenium::WebDriver::Remote::Http::Default.new
@client.timeout = 300 # seconds – default is 60

@driver = Watir::Browser.new :firefox, :http_client => @client
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.