org.openqa.selenium.WebDriverException:java.net.ConnectException:无法连接到localhost / 0:0:0:0:0:0:0:1:10059 构建信息:版本:'3.10.0',版本:'176b4a9',时间:'2018-03-02T19:03:16.397Z' 系统信息:主机:'RAHULSAINI-PC',ip:'192.168.0.101',操作系统名称:'Windows 7',os.arch:'amd64',os.version:'6.1',java.version:'1.8 .0_171' 驱动程序信息:driver.version:FirefoxDriver
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:106)
at baseball.FireFoxLaunch.abdhasd(FireFoxLaunch.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
原因:java.net.ConnectException:无法连接到localhost / 0:0:0:0:0:0:0:0:1:10059 在okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240) 在okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158) 在okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256) 在okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134) 在okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113) 在okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) 在okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) 在okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) 在okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) 在okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) 在okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) 在okhttp3.RealCall.execute(RealCall.java:77) 在org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:101) 在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101) 在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) 在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138) 在org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) ...另外30个 引起原因:java.net.ConnectException:连接被拒绝:connect 在java.net.DualStackPlainSocketImpl.waitForConnect(本机方法) 在java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) 在java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 在java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 在java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 在java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 在java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 在java.net.Socket.connect(Socket.java:589) 在okhttp3.internal.platform.Platform.connectSocket(Platform.java:125) 在okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238) ... 52更多