org.openqa.selenium.TimeoutException: timeout

276 views
Skip to first unread message

xyin...@gmail.com

unread,
Oct 9, 2018, 9:59:25 PM10/9/18
to Selenium Users
I have the following problems when using the‘ webdriver.get()’


org.openqa.selenium.TimeoutException: timeout
  (Session info: chrome=66.0.3359.181)
  (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'crawler001', ip: '10.0.8.4', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_144'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=WIN8_1, acceptSslCerts=false, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=WIN8_1, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7), userDataDir=C:\Users\crawl\AppData\Local\Temp\2\scoped_dir8976_27398}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=66.0.3359.181, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
Session ID: 3d48b566ed8daf2b8ca1cd2e26abebd5
at sun.reflect.GeneratedConstructorAccessor32.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:582)
at com.test.driver.ControlDriver.getUrl(ControlDriver.java:156)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Krishnan Mahadevan

unread,
Oct 9, 2018, 10:13:19 PM10/9/18
to seleniu...@googlegroups.com

The selenium version (3.5.3) you are using is over a year old.

 

Can you please retry using the latest released version of Selenium viz., 3.14.0 ?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6b4ea7b3-f7b7-4e88-835c-9d3ce0d8daba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

xyin...@gmail.com

unread,
Oct 10, 2018, 10:43:13 PM10/10/18
to Selenium Users
Hello, I use selenium viz., 3.14.0 results are the same.


org.openqa.selenium.TimeoutException: timeout
  (Session info: chrome=66.0.3359.181)
  (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'crawler004', ip: '10.0.8.6', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_144'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.544315 (730aa6a5fdba15..., userDataDir: C:\Users\crawler\AppData\Lo...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 66.0.3359.181, webStorageEnabled: true}
Session ID: 2bb526ed46f8f1ee9ef0ffbd2a5a4799
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:485)
at com.test.driver.ControlDriver.getUrl(ControlDriver.java:156)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

==========================================================================================================


在 2018年10月10日星期三 UTC+8上午10:13:19,Krishnan Mahadevan写道:

Krishnan Mahadevan

unread,
Oct 10, 2018, 10:46:12 PM10/10/18
to seleniu...@googlegroups.com

Your code is basically crashing in this line : at com.test.driver.ControlDriver.getUrl(ControlDriver.java:156)

 

From the stacktrace it looks like the above line is making a call to executeScript().

 

Are you sure your Javascript is correct and doesn’t have any issues ?

It would be better if you could please help share the code snippet as well.

xyin...@gmail.com

unread,
Oct 10, 2018, 11:03:21 PM10/10/18
to Selenium Users
Hello, I just used the basic way to open URL's JS, originally using'webDriver.get (URL) way.

What I don't understand is that the problem always occurs when the page is opened.

Here is my code

public static Boolean getUrl(WebDriver driver, String url) {
JavascriptExecutor js = (JavascriptExecutor) driver;
try {
js.executeScript(new StringBuffer().append("self.location.href='").append(url).append("';").toString());
} catch (Exception e) {
e.printStackTrace(new PrintWriter(sw));
logger.info("##########getUrlException:\n" + sw);

try {
Thread.sleep(IntegerUtil.random(40000, 30000));
} catch (InterruptedException e1) {
e1.printStackTrace();
}
if (n == 5) {
return false;
}
n++;
getUrl(driver, url);
}
return true;
}

===================================================================================

在 2018年10月11日星期四 UTC+8上午10:46:12,Krishnan Mahadevan写道:
Reply all
Reply to author
Forward
0 new messages