youzai366 发表于 2018-4-4 21:33:41

在运行appium时,经常跑着跑着会出现连不上设备,失败重跑又能成功,为什么 呢

大神,在运行appium时,经常跑着跑着会出现连不上设备,但是失败重跑测试用例又好了,提示是recv failed,这是什么原因,有解决办法吗?谢谢!

是不是我从手机端读取大量的数据,导致手机出错了?

提示如下:

org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died. Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: 'DESKTOP-F6GLHCI', ip: '192.254.0.251', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161' Driver info: driver.version: AndroidDriver Capabilities [{appPackage=com.iteach.zed.a03, deviceScreenSize=1080x1920, networkConnectionEnabled=true, noReset=true, warnings={}, databaseEnabled=false, deviceName=GSLDU17C06003131, platform=LINUX, deviceUDID=GSLDU17C06003131, appActivity=com.iteach.zed.a03.activity.LoginActivity, desired={appPackage=com.iteach.zed.a03, appActivity=com.iteach.zed.a03.activity.LoginActivity, noReset=true, newCommandTimeout=10000, unicodeKeyboard=true, platformName=Android, deviceName=huawei, resetKeyboard=true}, newCommandTimeout=10000, platformVersion=7.0, webStorageEnabled=false, locationContextEnabled=false, takesScreenshot=true, javascriptEnabled=true, deviceModel=FRD-AL10, unicodeKeyboard=true, platformName=Android, deviceManufacturer=HUAWEI, resetKeyboard=true}] Session ID: 1304184a-61e9-407a-afc2-e76ac04f2280 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:43) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363) at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:413) at io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:59) at io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1) at org.openqa.selenium.By$ById.findElement(By.java:218) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355) at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:51) at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1) at com.iteach.zed.a03.main.A03FindText.findZhenmaTextIMSI(A03FindText.java:618) at com.iteach.zed.a03.main.NewTest2.t_003_zhenmaIMSI(NewTest2.java:100) Caused by: org.openqa.selenium.WebDriverException: java.net.SocketException: Software caused connection abort: recv failed Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: 'DESKTOP-F6GLHCI', ip: '192.254.0.251', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161' Driver info: driver.version: AndroidDriver at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:76) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644) ... 40 more Caused by: java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.http.impl.conn.LoggingInputStream.read(LoggingInputStream.java:87) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144) at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:64) ... 41 more ... Removed 25 stack frames
页: [1]
查看完整版本: 在运行appium时,经常跑着跑着会出现连不上设备,失败重跑又能成功,为什么 呢