Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Error : Timed out after 30000ms

View previous topic View next topic Go down

Error : Timed out after 30000ms

Post by senthilm.aynara on Thu Sep 24, 2009 6:28 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

senthilm.aynara
Active particpant
Active particpant

Posts: 19
Join date: 2009-09-15

Back to top Go down

Re: Error : Timed out after 30000ms

Post by Adviser on Fri Sep 25, 2009 9:29 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:

  • timeout - a timeout in milliseconds, after which the action will return with an error
Best of luck

Bye

Adviser
------------------------
------------------------

Posts: 367
Join date: 2009-07-30
Location: India

http://seleniumforum.forumotion.net

Back to top Go down

Re: Error : Timed out after 30000ms

Post by senthilm.aynara on Fri Sep 25, 2009 6:04 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

senthilm.aynara
Active particpant
Active particpant

Posts: 19
Join date: 2009-09-15

Back to top Go down

Re: Error : Timed out after 30000ms

Post by ravida on Wed Oct 14, 2009 5:38 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

ravida

Posts: 2
Join date: 2009-10-14

Back to top Go down

Re: Error : Timed out after 30000ms

Post by mugenhere on Fri Mar 19, 2010 6:59 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

mugenhere

Posts: 9
Join date: 2009-09-08

Back to top Go down

Re: Error : Timed out after 30000ms

Post by s.veerachary on Fri May 07, 2010 11:28 am

Hi,

Use this commond for page wait.

thread.sleep(40000);

Chary.

s.veerachary

Posts: 4
Join date: 2010-05-04

Back to top Go down

Re: Error : Timed out after 30000ms

Post by metman on Fri May 07, 2010 10:01 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.

metman
Amateur
Amateur

Posts: 58
Join date: 2010-04-02

Back to top Go down

Re: Error : Timed out after 30000ms

Post by sulee on Tue Dec 28, 2010 6:43 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)

sulee
Active particpant
Active particpant

Posts: 14
Join date: 2010-12-27

Back to top Go down

Re: Error : Timed out after 30000ms

Post by vickrant on Wed Jan 05, 2011 4:32 pm

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

Back to top Go down

Re: Error : Timed out after 30000ms

Post by srinath on Fri Jan 07, 2011 3:27 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

srinath

Posts: 3
Join date: 2011-01-07

Back to top Go down

Re: Error : Timed out after 30000ms

Post by sulee on Fri Jan 07, 2011 3:49 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.

sulee
Active particpant
Active particpant

Posts: 14
Join date: 2010-12-27

Back to top Go down

Re: Error : Timed out after 30000ms

Post by srinath on Fri Jan 07, 2011 4:01 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.


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

Back to top Go down

Re: Error : Timed out after 30000ms

Post by sulee on Fri Jan 07, 2011 6:29 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..

sulee
Active particpant
Active particpant

Posts: 14
Join date: 2010-12-27

Back to top Go down

Re: Error : Timed out after 30000ms

Post by srinath on Fri Jan 07, 2011 8:19 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.

srinath

Posts: 3
Join date: 2011-01-07

Back to top Go down

Re: Error : Timed out after 30000ms

Post by shaz on Thu Jan 27, 2011 5:04 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

shaz

Posts: 1
Join date: 2011-01-27

Back to top Go down

Re: Error : Timed out after 30000ms

Post by ashish789 on Sun Feb 13, 2011 10:14 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

ashish789

Posts: 1
Join date: 2011-02-13

Back to top Go down

View previous topic View next topic Back to top


Permissions in this forum:
You cannot reply to topics in this forum