My blog has moved!
You should be automatically redirected in 5 seconds. If not, visit and update your bookmarks.

Wednesday, 24 February 2010 timeouts for strange reasons

Have you ever been in situations when your selenium RC test times out after the command, the page is loaded but selenium just tells you that it has timed out after 30000ms.

I had same problem in Java today when i got the selenium RC 1.0.3 and i fixed the problem by setting the selenium timeout to be "0". so i have done

public void setUp(){
selenium = new DefaultSelenium("localHost", 4444, "*iexplore", url);

and then i have used a waitForPageToLoad in each of the selenium methods that needs to wait - open, click .....;

Hopefully you find this useful.


alexded said...

Thank you!
It was relly helpfull for me! :)

Anonymous said...

problem solved... thanks!

Kiran said...

Gr8 man. It solved my problem . Thansk a lot

Anonymous said...

This worked for us as well. Thanks a lot for posting this!

Anonymous said...

I had been putting the open lines inside a try but that meant it paused for 30 seconds every time. My tests are so much faster now - thanks!

Anonymous said...

You made my day! Been looking for this for about three days...

Anonymous said...

Worked for me also, thanks for posting!

Venu said...

thanks for the solution, I was struggling with the time out error for quite some time.

Anonymous said...

Ideally you should set a particular timeout greater than 30 seconds instead of setting it to 0.

leumascom said...

I dont agree with you because if you have experienced this problem before, you would notice that the page has completely loaded, setting the timeout greater than 30secs would only increase the time you have to wait before you get a timeout error.

You dont get this error always, but when you do it could frustrate you