tags:

views:

523

answers:

1

Hi, I'm using Selenium Ruby client on a site with really bad performance. My scripts fails each time because of time outs. For a weeks now I am researching how time out limit can be set when using Selenium.

My (Ruby) script is

selenium.set_timeout(30000000000000) # does not work?
selenium.open myurl

In the Selenium log I can see that setTimeout method is called

setTimeout(30000000000000)
open(https://....

So it looks like some time out method is called but it doesn't do anything for open. Time out remains default value. Is there some other time out method I should use for open?

Thanks Onno

+4  A: 

Have you tried the timeout_in_second option when creating your selenium option?

def setup
  @verification_errors = []
  @selenium = Selenium::Client::Driver.new \
    :host => "localhost",
    :port => 4444,
    :browser => "*chrome",
    :url => "http://localhost:3000/",
    :timeout_in_second => 60

  @selenium.start_new_browser_session
end
adam goucher