Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
sulee
Active particpant
Active particpant
Posts : 14
Join date : 2010-12-27

The connection has timed out Empty The connection has timed out

Tue Mar 15, 2011 6:46 pm
Hi all,

I am using java client driver and eclipse java ee helios, my setup is complete to run selenese test cases.
In fact i connect to some sites, and i cannot connect to some sites. For instance the test below runs correctly:

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;

public class google extends SeleneseTestCase {
public void setUp() throws Exception {
//setUp("http://www.google.com/", "*chrome");
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://172.31.206.23");
selenium.start();
}
public void testUntitled() throws Exception {
selenium.open("/");
selenium.waitForPageToLoad("30000");

}
}

Whereas if change the base url to www.google.com, I cannot connect and I got browser message as below:

The connection has timed out
The server at www.google.com is taking too long to respond.

And the console error message is:

Got result: Timed out after 30000ms on session d359......

Could anyone tell me reason for that? Because i cannot test the we site i am suppose to do. Thanks in advance.

Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

The connection has timed out Empty Re: The connection has timed out

Thu Mar 17, 2011 8:08 pm
hi,

use custom wait command in java instead of using selenium command.

create one function which take parameter to wait up to how much seconds and used that every where you want to wait.

best of luck
avatar
gaurang033
Active particpant
Active particpant
Posts : 13
Join date : 2011-03-19

The connection has timed out Empty Re: The connection has timed out

Sat Mar 19, 2011 8:04 pm
I am using following function...

public void waitUntilElementPresent(String xpath, int timpout){
int count=0;
while(selenium.isElementPresent(xpath)){
Thread.sleep(1000); //wait for minute
if(60*count++ > timout)
break;
}
}
avatar
auto_ashish1
Active particpant
Active particpant
Posts : 21
Join date : 2011-03-10

The connection has timed out Empty Re: The connection has timed out

Tue Apr 05, 2011 11:58 pm
You can add your own user-extension.js to change the default timeout of 30000 MS

Regards

Ashish
itsthakur@gmail.com
91-9888179981


For online Selenium training go to my website- www.sejsoft.com
Sponsored content

The connection has timed out Empty Re: The connection has timed out

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