selenium.open timeouts for strange reasons

>Have you ever been in situations when your selenium RC test times out after the selenium.open 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

@BeforeClass
public void setUp(){
selenium = new DefaultSelenium(“localHost”, 4444, “*iexplore”, url);
selenium.start();
selenium.setTimeout(“0”);
}

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

selenium.open(url);
selenium.waitForPageToLoad(“5000”);

selenium.click(“btnG”);
selenium.waitForPageToLoad(“5000”);

Hopefully you find this useful.

Advertisements
This entry was posted in Software Testing. Bookmark the permalink.

12 Responses to selenium.open timeouts for strange reasons

  1. alexded says:

    >Thank you!It was relly helpfull for me! šŸ™‚

  2. Anonymous says:

    >problem solved… thanks!

  3. Kiran says:

    >Gr8 man. It solved my problem . Thansk a lot

  4. Anonymous says:

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

  5. >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!

  6. Anonymous says:

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

  7. Anonymous says:

    >Worked for me also, thanks for posting!

  8. Venu says:

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

  9. Anonymous says:

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

  10. leumascom says:

    >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

  11. Anonymous says:

    Hello, for me, after setting up timeout to 0 the page successfully loaded but then I am using selenium.waitForPageToLoad(“60000”) and now it always timeouts no matter what, after 60 seconds I get this error: 3:22:24.851 INFO – Got result: Timed out after 60000ms on session.

    I am using windows 7 64-bits and IE 8, same browser on windows XP works perfect, but not on windows 7, have you ever seen something like this?

    Thanks!

  12. Sanjay Dhami says:

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s