Posts

Showing posts from May, 2016

Change Default Timeout and Wait Time of Capybara

Image
One of the biggest challenge for automation is handling timeout problem. Most of the time, timeout is 60 seconds but it may sometimes not enough if you have badly designed asynchronous calls or the third party ajax calls. This makes handling timeout more complex.
set large enough to tolerate network related problems. For Selenium based automation frameworks, like Capybara, default Webdriver timeout is set to Net::ReadTimeout (Net::ReadTimeout)
Changing ReadTimeout If you have timeout problem for Capybara, it gives an error like above. This means that the page is not fully loaded in given timeout period. Even you can see that page is loaded correctly but webdriver wait until the Ajax calls finish. classBufferedIO#:nodoc: internal use onlydefinitialize(io) @io= io @read_timeout=60@continue_timeout=nil@debug_output=nil@rbuf=''end.....defrbuf_fillbegin@rbuf<<@io.read_nonblock(BUFSIZE) rescueIO::WaitReadableifIO.select([@io], nil, nil, @read_timeout…