GEB / Selenium:连接到localhost失败:连接被拒绝

时间:2016-11-19 13:54:18

标签: selenium-webdriver groovy automation geb

我尝试使用Firefox / Gecko驱动程序来接收geb-spock,但每次我构建并尝试运行测试时,都会收到一条错误,即localhost上的连接不能打开。 你对此有什么想法吗?

  

2016年11月19日下午2:50:28 org.openqa.selenium.remote.ProtocolHandshake createSession   信息:尝试双方言会议,假设Postel的法律在远程端是正确的   捕获:org.openqa.selenium.WebDriverException:org.apache.http.conn.HttpHostConnectException:连接到localhost:32426 [localhost / 127.0.0.1,localhost / 0:0:0:0:0:0:0:1]失败:连接被拒绝:连接   构建信息:版本:' 3.0.1',修订版:' 1969d75',时间:' 2016-10-18 09:49:13 -0700'   系统信息:主持人:' NOT SHOWN',ip:'要求它',os.name:' Windows 10',os.arch:' amd64',os.version:' 10.0',java.version:' 1.8.0_91'   驱动程序信息:driver.version:FirefoxDriver   org.openqa.selenium.WebDriverException:org.apache.http.conn.HttpHostConnectException:连接到localhost:32426 [localhost / 127.0.0.1,localhost / 0:0:0:0:0:0:0:1]失败:连接被拒绝:连接   构建信息:版本:' 3.0.1',修订版:' 1969d75',时间:' 2016-10-18 09:49:13 -0700'   系统信息:主持人:' NOT SHOWN',ip:'要求它',os.name:' Windows 10',os.arch:' amd64',os.version:' 10.0',java.version:' 1.8.0_91'   驱动程序信息:driver.version:FirefoxDriver       在org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)       在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)       在org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)       在org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:128)       在org.openqa.selenium.firefox.FirefoxDriver。(FirefoxDriver.java:259)       在org.openqa.selenium.firefox.FirefoxDriver。(FirefoxDriver.java:247)       在org.openqa.selenium.firefox.FirefoxDriver。(FirefoxDriver.java:242)       在org.openqa.selenium.firefox.FirefoxDriver。(FirefoxDriver.java:238)       在org.openqa.selenium.firefox.FirefoxDriver。(FirefoxDriver.java:127)       at geb.driver.NameBasedDriverFactory.getDriver(NameBasedDriverFactory.groovy:42)       at geb.driver.CachingDriverFactory $ _getDriver_closure3.doCall(CachingDriverFactory.groovy:80)       at geb.driver.CachingDriverFactory $ _getDriver_closure3.doCall(CachingDriverFactory.groovy)       at geb.driver.CachingDriverFactory $ SimpleCache.get(CachingDriverFactory.groovy:30)       在geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)       在geb.Configuration.createDriver(Configuration.groovy:306)       在geb.Configuration.getDriver(Configuration.groovy:295)       在geb.Browser.getDriver(Browser.groovy:101)       在geb.Browser.go(Browser.groovy:367)       在geb.Browser $ go $ 1.callCurrent(未知来源)       在geb.Browser.go(Browser.groovy:359)       在Test1 $ _run_closure1.doCall(Test1.groovy:11)       在Test1 $ _run_closure1.doCall(Test1.groovy)       在geb.Browser.drive(Browser.groovy:701)       在geb.Browser $ drive $ 0.callStatic(未知来源)       在geb.Browser.drive(Browser.groovy:671)       在geb.Browser $ drive.call(未知来源)       在Test1.run(Test1.groovy:9)       在com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)   引起:org.apache.http.conn.HttpHostConnectException:连接到localhost:32426 [localhost / 127.0.0.1,localhost / 0:0:0:0:0:0:0:1]失败:连接被拒绝:连接       at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158)       at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)       at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)       在org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)       在org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)       在org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)       在org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)       在org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)       在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)       在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)       在org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142)       在org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88)       在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:108)       在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)       在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)       在org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)       ......还有27个   引起:java.net.ConnectException:连接被拒绝:连接       at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)       at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)       ......还有42个

0 个答案:

没有答案