2017-02-08 107 views
1

我想在mac中使用appium(ver.1.5.3)自动化android应用程序。我收到下面提到的错误。请帮忙。javax.net.ssl.SSLHandshakeException:握手期间远程主机关闭连接支持

WebDriverException:javax.net.ssl.SSLHandshakeException:远程主机握手期间 关闭的连接建立信息:版本: '未知', 修订: '1969d75',时间:“2016年10月18日09:43 :45 -0700'系统信息: 主机:'AKASHs-MacBook-Pro.local',ip:'192.168.1.4',os.name:'Mac OS X',os.arch:'x86_64',os。版本:'10 .11.6',java.version: '1.8.0_121'驱动程序信息:driver.version:AndroidDriver at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:84) at org .openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) 处 io.appium.java_client.android.AndroidDriver.execute io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) 在io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) (AndroidDriver.java:1) 在 org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241) 在 org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:128) 在 org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:141) 在 io.appium.java_client.DefaultGenericMobileDriver。(DefaultGenericMobileDriver.java:38) 在io.appium.java_client.Ap piumDriver。(AppiumDriver.java:90)at io.appium.java_client.AppiumDriver。(AppiumDriver.java:128)at io.appium.java_client.android.AndroidDriver。(AndroidDriver.java:72)at com.test1 .Test1.setUp(Test1.java:33)在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104) at org.testng.internal .Invoker.invokeMethod(Invoker.java:645)at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851) org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java: 129) 在org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) 在org.testng.TestRunner.privateRun(TestRunner.java:756)在 org.testng.TestRunner.run(TestRunner.java: 610)留在在 org.testng.SuiteRunner.privateRun org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382) org.testng.SuiteRunner.runTest(SuiteRunner.java:387)(SuiteRunner.java:340) org.testng.SuiteRunner.run(SuiteRunner.java:289)at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWo rker.java:52)在 org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)处 org.testng.TestNG.runSuitesLocally org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)(TestNG的。的java:1218)处 org.testng.TestNG.run(TestNG.java:1104)在 org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG org.testng.TestNG.runSuites(TestNG.java:1133)。 java:132) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)at org.testng.remote。RemoteTestNG.main(RemoteTestNG.java:81)引起的: javax.net.ssl.SSLHandshakeException:远程主机握手期间在 sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992)在 太阳关闭连接 .security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) 在 sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) 在 sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java :1387) 在 org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394) 在 org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket( SSLConnectionSocketFactory.java:353) 在 org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) 在 org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java: 353) 在 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 (ProtocolHands hake.java:108) 在 org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64) 在 org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) 在 io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69) ... 37更多引起:java.io.EOFException:SSL对等关闭 错误地在sun.security.ssl.InputRecord.read (InputRecord.java:505) 在sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) ...... 58多个

+0

任何帮助将不胜感激 –

回答

3

ç哎哟你正在使用的URL,它不应该包含https而不是使用http。我试过它为我工作。

+1

我尝试使用HTTP,它的工作。感谢大家的帮助 –

-1

它与java没有任何关系。检查您的证书 “的OpenSSL的s_client.First -connect <> 443”

确保验证码为0 如果它是非零;(20)这可能意味着(我猜在这里)你可能有一个自签名证书。这意味着您必须将该证书导入到您的java truststore中。

相关问题