当android驱动程序找到一些元素时,appium冻结([AndroidBootstrap]向android发送命令)并且会在一段时间后死掉。这只发生在一台计算机(Mac)上,只发生在Android上。
最后发送此appium:
[Appium] New AndroidDriver session created successfully, session 7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d added to master session list
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/Users/jenkins/.jenkins/jobs/Android5-test-ReleaseIntegtationTests-Demo/workspace/test-Integration-Tests/src/test/resources/testDemo-debug.apk","noReset":true,"newCommandTimeout":88,"udid":"018433348882859","platformName":"Android","deviceName":"Android","fullReset":false},"app":"/Users/jenkins/.jenkins/jobs/Android5-test-ReleaseIntegtationTests-Demo/workspace/test-Integration-Tests/src/test/resources/testDemo-debug.apk","noReset":true,"newCommandTimeout":88,"udid":"018433348882859","platformName":"Android","deviceName":"018433348882859","fullReset":false,"deviceUDID":"018433348882859","platformVersion":"5.1.1","appPackage":"com.my.testApp","appWaitPackage":"com.my.testApp","appActivity":"com.my.testApp.MainActivity","appWaitActivity":"com.my.targetDem...
[HTTP] <-- POST /wd/hub/session 200 6192 ms - 1112
[HTTP] --> GET /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d {}
[debug] [MJSONWP] Calling AppiumDriver.getSession() with args: ["7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d"]
[debug] [MJSONWP] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/Users/jenkins/.jenkins/jobs/Android5-test-ReleaseIntegtationTests-Demo/workspace/test-Integration-Tests/src/test/resources/testDemo-debug.apk","noReset":true,"newCommandTimeout":88,"udid":"018433348882859","platformName":"Android","deviceName":"Android","fullReset":false},"app":"/Users/jenkins/.jenkins/jobs/Android5-test-ReleaseIntegtationTests-Demo/workspace/test-Integration-Tests/src/test/resources/testDemo-debug.apk","noReset":true,"newCommandTimeout":88,"udid":"018433348882859","platformName":"Android","deviceName":"018433348882859","fullReset":false,"deviceUDID":"018433348882859","platformVersion":"5.1.1","appPackage":"com.my.testApp","appWaitPackage":"com.my.testApp","appActivity":"com.my.testApp.MainActivity","appWaitActivity":"com.my.targetDem...
[HTTP] <-- GET /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d 200 5 ms - 1112
[HTTP] --> GET /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d {}
[debug] [MJSONWP] Calling AppiumDriver.getSession() with args: ["7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d"]
[debug] [MJSONWP] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/Users/jenkins/.jenkins/jobs/Android5-test-ReleaseIntegtationTests-Demo/workspace/test-Integration-Tests/src/test/resources/testDemo-debug.apk","noReset":true,"newCommandTimeout":88,"udid":"018433348882859","platformName":"Android","deviceName":"Android","fullReset":false},"app":"/Users/jenkins/.jenkins/jobs/Android5-test-ReleaseIntegtationTests-Demo/workspace/test-Integration-Tests/src/test/resources/testDemo-debug.apk","noReset":true,"newCommandTimeout":88,"udid":"018433348882859","platformName":"Android","deviceName":"018433348882859","fullReset":false,"deviceUDID":"018433348882859","platformVersion":"5.1.1","appPackage":"com.my.testApp","appWaitPackage":"com.my.testApp","appActivity":"com.my.testApp.MainActivity","appWaitActivity":"com.my.targetDem...
[HTTP] <-- GET /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d 200 3 ms - 1112
[HTTP] --> POST /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d/timeouts {"type":"implicit","ms":10000}
[debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: ["implicit",10000,"7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d"]
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [MJSONWP] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d/timeouts 200 3 ms - 76
[HTTP] --> POST /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d/timeouts {"type":"implicit","ms":1000}
[debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: ["implicit",1000,"7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d"]
[debug] [BaseDriver] Set implicit wait to 1000ms
[debug] [MJSONWP] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d/timeouts 200 3 ms - 76
[HTTP] --> POST /wd/hub/session/7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d/elements {"using":"id","value":"com.my.testApp:id/card_view"}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["id","com.my.testApp:id/card_view","7de5c8a9-3d5e-49dc-b228-3b76f0cf5f1d"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 1000 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.my.testApp:id/card_view","context":"","multiple":true}}
Appium:1.6.1
io.appium:Java的客户机:5.0.0-β3
亚行:1.0.36
Appium功能:
File appDir = new File(System.getProperty("user.dir") + properties.getProperty("appDir"));
File app = new File(appDir, System.getProperty("appName"));
capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, System.getProperty("platform"));
capabilities.setCapability(MobileCapabilityType.UDID, System.getProperty("udid"));
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 88);
androidDriver = new AndroidDriver(new URL(System.getProperty("appiumUrl")), capabilities);
androidDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
有什么想法吗?
答案 0 :(得分:0)
重新安装appium 1.6.1对我没有帮助。
但我在将appium降级到1.5.3并升级回1.6.1后解决了我的问题。
显然版本1.5.3已经删除了缺少的库。但是为什么1.6.1没有这样做我不知道。