-1

I am getting same error, it just open the mention URL and closes the browser with following error com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms

Following is the code i am trying with Selenium RC and junit

guerda
  • 23,388
  • 27
  • 97
  • 146
Sudhir Patil
  • 25
  • 3
  • 7
  • possible duplicate of [Timeout after just opening the URL](http://stackoverflow.com/questions/15176563/timeout-after-just-opening-the-url) – guerda Mar 04 '13 at 08:24

3 Answers3

1

The page is taking more than 30000ms to load.

Try to change the time.

selenium.waitforPagetoLoad(60000)

instead of

selenium.waitforPagetoLoad(30000)
HemChe
  • 2,249
  • 1
  • 21
  • 33
0

you can use looping and inside loop you can check specific element on the page is loaded or not.so that counter will wait till that elements get loaded, this way you can apply dynamic Wait control in your code.

for (int second = 0;; second++) {
        if (second >= 160) fail("timeout");
        try { if (selenium.isTextPresent("add element on the page here")) break; } catch (Exception e) {}
        Thread.sleep(1000);
    }
0

try this

    selenium.setTimeout("0");

    selenium.waitForPageToLoad("0");
dinesh.kumar
  • 167
  • 1
  • 10