Canonical answer for how to increase global timeout on Watir-Webdriver actions
seems to be
```ruby
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 180 # seconds – default is 60
b = Watir::Browser.new :firefox, :http_client => client
```
[-- Alistair Scott, GitHub, January
2012](http://stackoverflow.com/questions/9014121/how-do-i-change-the-page-load-timeouts-in-watir-webdriver-timeout-in-click-met)
See also [Ruby Forum](https://www.ruby-forum.com/topic/4409978) and
[GrokBase](http://grokbase.com/t/gg/watir-general/128was0r8n/wtr-general-im-failing-at-changing-the-timeout-length)
Is this correct? Because if so, I am experiencing a bug:
```ruby
begin
headless = Headless.new
headless.start
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120
b = Watir::Browser.new :firefox, :http_client => client
b.goto 'http://linktranet-qa.linksynergy.com/'
puts Time.now #=> 2013-11-13 16:34:01 +0000
begin
b.link(:id => 'does_not_exist').when_present.click
rescue => e
puts e #=> timed out after 30 seconds, waiting for
{:id=>"does_not_exist", :tag_name=>"a"} to become present
end
puts Time.now #=> 2013-11-13 16:34:31 +0000
ensure
b.close
headless.destroy
end
```
As you can see timeout is 30 seconds. Is this a bug? If so, is there a
different way to set it?
ruby 2.0.0p247
watir-webdriver (0.6.4)
selenium-webdriver (2.37.0)
Mozilla Firefox 17.0.10
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/227_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development