我在 iPhone 5 上的自动化测试有问题。我之前可以在装有 iOS 6.1 的 iPad 上开始测试,但现在我想在 iPhone 5 iOS 8.1 上进行测试
在 Eclipse 中,我收到消息无法创建新 session 。
来自appium的日志:
error: Failed to start an Appium session, err was: Error: App did not have elements
info: [debug] Error: App did not have elements
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ ios.js:459:30
at Object.cb [as callback] (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios /ios-controller.js:247:7)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:801:43)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:32:16
at exports.respond (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:28:9)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1449:18)
at getResultAndSendNext (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/lib/command-proxy.js:146:20)
at Socket.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/lib/command-proxy.js:88:7)
at Socket.emit (events.js:117:20)
at _stream_readable.js:944:16
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: App did not have elements)","origValue":"应用没有元素"},"sessionId":null}
信息:<-- POST/wd/hub/session 500 29025.843 ms - 172
能力:
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "8.1");
capabilities.setCapability("deviceName", "iPhone 5 iOS 8.1");
capabilities.setCapability("udid","104ce995950282f9dfaf371bf05ee6b00e7c0027);
谁能帮帮我?
Best Answer-推荐答案 strong>
从 iOS 8 开始,过多的 NSLog 输出会导致 UIAutomation 和 Appium 服务器的内部通信出现死锁。 (阅读这篇文章了解更多信息 Appium's Github page )
这会导致这种不希望的结果。
描述了预防性解决方法HERE : 这解决了我的问题。我希望它会有所帮助。
关于ios - Iphone 5 Appium 和 jUnit - 应用程序没有元素,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/28432542/
|