Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>Update</em>: Since <a href="https://github.com/watir/watir-webdriver/blob/master/CHANGES.md#065-2014-01-28" rel="nofollow noreferrer">Watir 6.5</a>, the default timeout is configurable using</p> <pre><code>Watir.default_timeout = 3 </code></pre> <hr> <p>We experienced the same issue and chose to override Watir methods involving timeouts, namely</p> <ul> <li><code>Watir::Wait.until { ... }</code></li> <li><code>Watir::Wait.while { ... }</code></li> <li><code>object.when_present.set</code></li> <li><code>object.wait_until_present</code></li> <li><code>object.wait_while_present</code></li> </ul> <p>Here is the code, you can put it in your <code>spec_helper.rb</code> if using <code>rspec</code></p> <pre><code># method wrapping technique adapted from https://stackoverflow.com/a/4471202/177665 def override_timeout(method_name, new_timeout = 3) if singleton_methods.include?(method_name) old_method = singleton_class.instance_method(method_name) define_singleton_method(method_name) do |timeout = new_timeout, *args, &amp;block| old_method.bind(self).(timeout, *args, &amp;block) end else old_method = instance_method(method_name) define_method(method_name) do |timeout = new_timeout, *args, &amp;block| old_method.bind(self).(timeout, *args, &amp;block) end end end # override default Watir timeout from 30 seconds to 3 seconds module Watir module Wait override_timeout(:until) override_timeout(:while) end module EventuallyPresent override_timeout(:when_present, 5) # 5 secs here override_timeout(:wait_until_present) override_timeout(:wait_while_present) end end </code></pre> <p>We used answer from <a href="https://stackoverflow.com/a/4471202/177665">https://stackoverflow.com/a/4471202/177665</a> to get it working.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload