Error : Timed out after 30000ms
+7
sulee
metman
s.veerachary
mugenhere
ravida
Advisor
senthilm.aynara
11 posters
- senthilm.aynaraActive particpant
- Posts : 19
Join date : 2009-09-15
Error : Timed out after 30000ms
Thu Sep 24, 2009 7:58 pm
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
Re: Error : Timed out after 30000ms
Fri Sep 25, 2009 10:59 am
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
- senthilm.aynaraActive particpant
- Posts : 19
Join date : 2009-09-15
Re: Error : Timed out after 30000ms
Fri Sep 25, 2009 7:34 pm
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
- ravida
- Posts : 2
Join date : 2009-10-14
Re: Error : Timed out after 30000ms
Wed Oct 14, 2009 7:08 pm
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
- mugenhere
- Posts : 9
Join date : 2009-09-08
Re: Error : Timed out after 30000ms
Fri Mar 19, 2010 8:29 pm
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
- s.veerachary
- Posts : 4
Join date : 2010-05-04
Re: Error : Timed out after 30000ms
Fri May 07, 2010 12:58 pm
Hi,
Use this commond for page wait.
thread.sleep(40000);
Chary.
Use this commond for page wait.
thread.sleep(40000);
Chary.
- metmanAmateur
- Posts : 58
Join date : 2010-04-02
Re: Error : Timed out after 30000ms
Fri May 07, 2010 11:31 pm
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.
- suleeActive particpant
- Posts : 14
Join date : 2010-12-27
Re: Error : Timed out after 30000ms
Tue Dec 28, 2010 8:13 pm
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)
- vickrant
- Posts : 4
Join date : 2011-01-05
Re: Error : Timed out after 30000ms
Wed Jan 05, 2011 6:02 pm
You can use Selenium.setTimeout("120000") at the top and use time out of what ever you want
- srinath
- Posts : 3
Join date : 2011-01-07
Re: Error : Timed out after 30000ms
Fri Jan 07, 2011 4:57 pm
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
- suleeActive particpant
- Posts : 14
Join date : 2010-12-27
Re: Error : Timed out after 30000ms
Fri Jan 07, 2011 5:19 pm
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.
- srinath
- Posts : 3
Join date : 2011-01-07
Re: Error : Timed out after 30000ms
Fri Jan 07, 2011 5:31 pm
@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.
- suleeActive particpant
- Posts : 14
Join date : 2010-12-27
Re: Error : Timed out after 30000ms
Fri Jan 07, 2011 7:59 pm
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..
- srinath
- Posts : 3
Join date : 2011-01-07
Re: Error : Timed out after 30000ms
Fri Jan 07, 2011 9:49 pm
@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.
- shaz
- Posts : 1
Join date : 2011-01-27
Re: Error : Timed out after 30000ms
Thu Jan 27, 2011 6:34 pm
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
- ashish789
- Posts : 1
Join date : 2011-02-13
Re: Error : Timed out after 30000ms
Sun Feb 13, 2011 11:44 pm
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
- Getting the error msg 'Error: Could not find or load main class java-jar' while executing the selenium code in eclipse
- [Help] Timed out after 30000ms error
- How to resolve this error---->[error] Element id=ui-active-menuitem not found
- Provided Base URL is not getting opened. Script fails with warn: currentTest.recordFailure: Timed out after 30000ms
- ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Permission denied
Permissions in this forum:
You cannot reply to topics in this forum