Error : Timed out after 30000ms
Page 1 of 1 • Share •
Error : Timed out after 30000ms
Hi all,
I am using Selenium RC with java client driver.
Here i am getting Timed out after 30000ms error in RC server.
ie, i have
selenium.click("//ul[@id='firstnav']/li[1]/a/span");
selenium.waitForPageToLoad("20000");
selenium.click("//a[@id='btnEdit']/span");
Here if i remove "selenium.waitForPageToLoad("20000");" . It gives
"a[@id='btnEdit']/spanNot found error" .
How can i fix this. It would be great if anybody help me to solve this.
Thanks & Regards,
senthilm
I am using Selenium RC with java client driver.
Here i am getting Timed out after 30000ms error in RC server.
ie, i have
selenium.click("//ul[@id='firstnav']/li[1]/a/span");
selenium.waitForPageToLoad("20000");
selenium.click("//a[@id='btnEdit']/span");
Here if i remove "selenium.waitForPageToLoad("20000");" . It gives
"a[@id='btnEdit']/spanNot found error" .
How can i fix this. It would be great if anybody help me to solve this.
Thanks & Regards,
senthilm
senthilm.aynara- Active particpant

- Posts: 19
Join date: 2009-09-15
Re: Error : Timed out after 30000ms
Hi,
Try to use these commands:
Selenium.clickAndWait("//ul[@id='firstnav']/li[1]/a/span");
selenium.click("//a[@id='btnEdit']/span");
Use clickAndWait command If page is refresh or new page is opening. WaitforPageLoad has some issue and it is not working.
If above will not work There is one more command availiable in RC, try this:
setTimeout(timeout)
Specifies the amount of time that Selenium will wait for actions to complete.
Actions that require waiting include "open" and the "waitFor*" actions.
The default timeout is 30 seconds.
Arguments:
Bye
Try to use these commands:
Selenium.clickAndWait("//ul[@id='firstnav']/li[1]/a/span");
selenium.click("//a[@id='btnEdit']/span");
Use clickAndWait command If page is refresh or new page is opening. WaitforPageLoad has some issue and it is not working.
If above will not work There is one more command availiable in RC, try this:
setTimeout(timeout)
Specifies the amount of time that Selenium will wait for actions to complete.
Actions that require waiting include "open" and the "waitFor*" actions.
The default timeout is 30 seconds.
Arguments:
- timeout - a timeout in milliseconds, after which the action will return with an error
Bye
Re: Error : Timed out after 30000ms
In java client driver, there is no method like clickAndWait() in selenium interface. so i handled exception here to continue for remaining statements..
Thanks,
senthilm
Thanks,
senthilm
senthilm.aynara- Active particpant

- Posts: 19
Join date: 2009-09-15
Re: Error : Timed out after 30000ms
try this one
browser.waitForPageToLoad("");
Clicks on a link, button, checkbox or radio button
and waits for a new page to load.
Thanks,
Ravida
browser.waitForPageToLoad("");
Clicks on a link, button, checkbox or radio button
and waits for a new page to load.
Thanks,
Ravida
ravida- Posts: 2
Join date: 2009-10-14
Re: Error : Timed out after 30000ms
Hi,
If you are sure that the element "//a[@id='btnEdit']/span" will be present on the page then replace:
selenium.waitForPageToLoad("20000");
by
selenium.waitForElement("//a[@id='btnEdit']/span");
(if this function is not present for you then you can write your own function using selenium.isElementPresent(String xpath))
This will be more reliable in several occasions than waitForPageToLoad
Hope this helps,
Mugen
If you are sure that the element "//a[@id='btnEdit']/span" will be present on the page then replace:
selenium.waitForPageToLoad("20000");
by
selenium.waitForElement("//a[@id='btnEdit']/span");
(if this function is not present for you then you can write your own function using selenium.isElementPresent(String xpath))
This will be more reliable in several occasions than waitForPageToLoad
Hope this helps,
Mugen
mugenhere- Posts: 9
Join date: 2009-09-08
Re: Error : Timed out after 30000ms
Hi,
Use this commond for page wait.
thread.sleep(40000);
Chary.
Use this commond for page wait.
thread.sleep(40000);
Chary.
s.veerachary- Posts: 4
Join date: 2010-05-04
Re: Error : Timed out after 30000ms
Using pure sleep isn't the best way. Putting a loop with a 1 second or so wait in it that repeats as many times as you are willing to wait and breaks when the element you are looking for is found is better.
metman- Amateur

- Posts: 58
Join date: 2010-04-02
Re: Error : Timed out after 30000ms
Hi all,
I am very very new to slenium and trying to run just these code:
I commented out all other lines except first line. Yet I get the error above and dont understand the reason. Any help will be appreciated. Thank you..
import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
public class deneme extends SeleneseTestCase {
public void setUp() throws Exception {
setUp("http://www.google.com.tr/", "*chrome");
}
public void testUntitled2() throws Exception {
selenium.open("/firefox?client=firefox-a&rls=org.mozilla:en-US:official");
/*selenium.type("sf", "selenium");
selenium.click("btnG");
selenium.waitForPageToLoad("30000");
selenium.click("link=Selenium web application testing system");
selenium.waitForPageToLoad("30000");
selenium.click("link=Documentation");
selenium.waitForPageToLoad("30000");
selenium.type("q", "selenium");
selenium.click("link=Selenium web application testing system");
selenium.waitForPageToLoad("30000");
selenium.click("link=Documentation");
selenium.waitForPageToLoad("30000");*/
}
}
here is the failure trace;
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:335)
at deneme.testUntitled2(deneme.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I am very very new to slenium and trying to run just these code:
I commented out all other lines except first line. Yet I get the error above and dont understand the reason. Any help will be appreciated. Thank you..
import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
public class deneme extends SeleneseTestCase {
public void setUp() throws Exception {
setUp("http://www.google.com.tr/", "*chrome");
}
public void testUntitled2() throws Exception {
selenium.open("/firefox?client=firefox-a&rls=org.mozilla:en-US:official");
/*selenium.type("sf", "selenium");
selenium.click("btnG");
selenium.waitForPageToLoad("30000");
selenium.click("link=Selenium web application testing system");
selenium.waitForPageToLoad("30000");
selenium.click("link=Documentation");
selenium.waitForPageToLoad("30000");
selenium.type("q", "selenium");
selenium.click("link=Selenium web application testing system");
selenium.waitForPageToLoad("30000");
selenium.click("link=Documentation");
selenium.waitForPageToLoad("30000");*/
}
}
here is the failure trace;
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:335)
at deneme.testUntitled2(deneme.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
sulee- Active particpant

- Posts: 14
Join date: 2010-12-27
Re: Error : Timed out after 30000ms
You can use Selenium.setTimeout("120000") at the top and use time out of what ever you want
vickrant- Posts: 4
Join date: 2011-01-05
Re: Error : Timed out after 30000ms
Hi I too facing the same issue .
selenium.click("//input[@value='Sign In']");
selenium.waitForPageToLoad("40000");
selenium.click("link=Private Pages (41)");
when comment waitForPageToLoad("40000"); it is showing error
Had any one found the solution for this using java client driver ?
Thanks in advance
selenium.click("//input[@value='Sign In']");
selenium.waitForPageToLoad("40000");
selenium.click("link=Private Pages (41)");
when comment waitForPageToLoad("40000"); it is showing error
Had any one found the solution for this using java client driver ?
Thanks in advance
srinath- Posts: 3
Join date: 2011-01-07
Re: Error : Timed out after 30000ms
Hi srinath,
first you could be because of this: after signing the page couldnt be loaded in 40ms thats why you get time out exception. Secondly if you give details what kind of error you get, we can be more helper.
first you could be because of this: after signing the page couldnt be loaded in 40ms thats why you get time out exception. Secondly if you give details what kind of error you get, we can be more helper.
sulee- Active particpant

- Posts: 14
Join date: 2010-12-27
Re: Error : Timed out after 30000ms
@sulee
Here is my code :
selenium.open("/web/alliance/home");
selenium.type("_58_login", "aa000admin");
selenium.type("_58_password", "tre100");
selenium.click("//input[@value='Sign In']");
echo("testTest1:testing assertion.");
selenium.waitForPageToLoad("10000");
selenium.click("link=Private Pages (41)");
I was unable to see the echo message , the script was breaking at line above echo only .
and error message is showing :
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:214)
at test.TestCases.testLogin(TestCases.java:12)
at test.SimpleTest.testTest3(SimpleTest.java:24)
... Removed 21 stack frames
Please Let me know if i need to give more information
thanks.
Here is my code :
selenium.open("/web/alliance/home");
selenium.type("_58_login", "aa000admin");
selenium.type("_58_password", "tre100");
selenium.click("//input[@value='Sign In']");
echo("testTest1:testing assertion.");
selenium.waitForPageToLoad("10000");
selenium.click("link=Private Pages (41)");
I was unable to see the echo message , the script was breaking at line above echo only .
and error message is showing :
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:214)
at test.TestCases.testLogin(TestCases.java:12)
at test.SimpleTest.testTest3(SimpleTest.java:24)
... Removed 21 stack frames
Please Let me know if i need to give more information
thanks.
Last edited by srinath on Fri Jan 07, 2011 8:20 pm; edited 1 time in total
srinath- Posts: 3
Join date: 2011-01-07
Re: Error : Timed out after 30000ms
himm timeout exception could be because of any reason, can you write the entire code I want try them. especially I need baseurl. Also I wonder what error do you get when you comment out waitForPageToLoad().... Thank you..
sulee- Active particpant

- Posts: 14
Join date: 2010-12-27
Re: Error : Timed out after 30000ms
@sulee,
Here is my Full code :
Changed paswd for security reasons as this is test site .
package test;
import org.testng.annotations.*;
import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
public class SimpleTest extends SeleneseTestCase {
private DefaultSelenium selenium;
@BeforeSuite(alwaysRun = true)
public void setUp() throws Exception {
echo("in setup.");
selenium = new DefaultSelenium("localhost", 4444, "*opera", "http://test.myplaceforparts.com/");
echo("selenium instance created:"+selenium.getClass());
selenium.start();
echo("selenium instance started. Opening website...");
}
@Test(groups = { "third" })
public void testTest3() throws Exception {
echo("Login method ..........");
selenium.open("/web/alliance/home");
selenium.type("_58_login", "aa000admin");
selenium.type("_58_password", "tre100");
selenium.click("//input[@value='Sign In']");
echo("testTest1:testing assertion.");
selenium.waitForPageToLoad("10000");
selenium.click("link=Private Pages (41)");
selenium.waitForPageToLoad("40000");
selenium.click("//div[@id='navigation']/ul/li[4]/a/span/b");
selenium.waitForPageToLoad("40000");
}
// Cleanup the selenium environment
@AfterSuite(alwaysRun = true)
private void stopTest() {
selenium.stop();
echo("selenium stopped.");
}
private void echo(String msg){
System.out.println(msg);
}
}
thanks.
Here is my Full code :
Changed paswd for security reasons as this is test site .
package test;
import org.testng.annotations.*;
import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
public class SimpleTest extends SeleneseTestCase {
private DefaultSelenium selenium;
@BeforeSuite(alwaysRun = true)
public void setUp() throws Exception {
echo("in setup.");
selenium = new DefaultSelenium("localhost", 4444, "*opera", "http://test.myplaceforparts.com/");
echo("selenium instance created:"+selenium.getClass());
selenium.start();
echo("selenium instance started. Opening website...");
}
@Test(groups = { "third" })
public void testTest3() throws Exception {
echo("Login method ..........");
selenium.open("/web/alliance/home");
selenium.type("_58_login", "aa000admin");
selenium.type("_58_password", "tre100");
selenium.click("//input[@value='Sign In']");
echo("testTest1:testing assertion.");
selenium.waitForPageToLoad("10000");
selenium.click("link=Private Pages (41)");
selenium.waitForPageToLoad("40000");
selenium.click("//div[@id='navigation']/ul/li[4]/a/span/b");
selenium.waitForPageToLoad("40000");
}
// Cleanup the selenium environment
@AfterSuite(alwaysRun = true)
private void stopTest() {
selenium.stop();
echo("selenium stopped.");
}
private void echo(String msg){
System.out.println(msg);
}
}
thanks.
srinath- Posts: 3
Join date: 2011-01-07
Re: Error : Timed out after 30000ms
Hi, I m using java for selenium RC and I want to know y com.thoughtworks.selenium package not providing all selenium functions like "clickAndWait". Is there any way to use these functions?? Thanks in advance
shaz- Posts: 1
Join date: 2011-01-27
Re: Error : Timed out after 30000ms
You can use the Wait class in Selenium. It helps to dynamically wait for page to load. You can refer the javadocs for the same.
For online Selenium training, visit my site: www.sejsoft.coom
For online Selenium training, visit my site: www.sejsoft.coom
ashish789- Posts: 1
Join date: 2011-02-13
Similar topics» Error Running app
» 3110 data blk error
» ccz80 2.11.2010 error
» TX-NR609 & DNS Connection Error?
» Sims 2 disc error... Unable to authenticate?
» 3110 data blk error
» ccz80 2.11.2010 error
» TX-NR609 & DNS Connection Error?
» Sims 2 disc error... Unable to authenticate?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum

» WebDriverException Was Unhandled
» Running @Test as parallel test
» Keysclass for modifire keys in c# does not work
» How to send mail of my script results?
» Se IDE and SQL, can they talk?
» Unable to select textarea values using webdriver (controls are develped using BMC remedy software)
» Verify text present when the text appears in more location in the page
» Can i automate silverlight web application using selenium driver for python.