Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 由于Selenium中的看门狗超时问题,Chrome实例未打开_Java_Google Chrome_Selenium - Fatal编程技术网

Java 由于Selenium中的看门狗超时问题,Chrome实例未打开

Java 由于Selenium中的看门狗超时问题,Chrome实例未打开,java,google-chrome,selenium,Java,Google Chrome,Selenium,从今天开始,当我运行我的测试套件时,我得到以下错误。我使用chrome驱动程序,因为我们的应用程序只在chrome上运行。同样的脚本在另一台机器上运行良好 Starting ChromeDriver 2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7) on port 37280 Only local connections are allowed. Nov 12, 2014 11:33:36 AM org.openqa.selenium.

从今天开始,当我运行我的测试套件时,我得到以下错误。我使用chrome驱动程序,因为我们的应用程序只在chrome上运行。同样的脚本在另一台机器上运行良好

Starting ChromeDriver 2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7) on port 37280
Only local connections are allowed.
Nov 12, 2014 11:33:36 AM org.openqa.selenium.os.UnixProcess$SeleniumWatchDog destroyHarder
INFO: Command failed to close cleanly. Destroying forcefully (v2).org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@1c06d198
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'MyTerminal', ip: '10.54.205.137', os.name: 'Windows 7', os.arch: 'amd64',  os.version: '6.1', java.version: '1.7.0_51'
Driver info: driver.version: ChromeDriver
   at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:589)
   at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
   at org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:181)
   at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
   at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
   at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:160)
   at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:128)
   at ChromeTest.main(ChromeTest.java:14)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'MyTerminal', ip: '10.54.205.137', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: driver.version: ChromeDriver
   at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
   at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:62)
   at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:568)
   ... 7 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:37280/status] to be available after 20001 ms
   at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
   at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)
   ... 9 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
   at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
   at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
   ... 10 more
Caused by: java.util.concurrent.TimeoutException
   at java.util.concurrent.FutureTask.get(FutureTask.java:201)
   at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
   ... 11 more
我使用了以下故障排除步骤。 1.尝试在chrome中禁用gpu监视器 2.重新安装的Chrome 3.从git hub重新克隆了我的所有项目 4.已安装旧版本

我运气不好。如果我在这里遗漏了什么,有人能给我指出正确的方向吗

我关心的是这些脚本一直运行到昨天,突然我得到了这个错误


提前感谢。

在用尽所有可能的选项后,我终于找到了一个解决方案。我在chrome驱动程序版本上玩了一个小把戏,但不知道为什么以及它是如何工作的。我遵循了这些步骤

我已经下载了最新版本的chrome驱动程序并运行了我的 selenium通过配置System.setProperty进行测试

现在,我双击了旧的chrome驱动程序版本,我将其用于我的 在运行我的selenium脚本时更早地执行脚本

然后我将脚本配置回我的旧版本

就是这样,我的脚本运行顺利,没有任何异常-