ios - Iphone 5 Appium 和 jUnit - 应用程序没有元素
<p><p>我在 iPhone 5 上的自动化测试有问题。我之前可以在装有 iOS 6.1 的 iPad 上开始测试,但现在我想在 iPhone 5 iOS 8.1 上进行测试</p>
<p>在 Eclipse 中,我收到消息无法创建新 session 。</p>
<p>来自appium的日志:</p>
<pre><code>error: Failed to start an Appium session, err was: Error: App did not have elements
info: 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 (/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
</code></pre>
<p>info: 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 </p>
<p>能力:</p>
<pre><code>capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "8.1");
capabilities.setCapability("deviceName", "iPhone 5 iOS 8.1");
capabilities.setCapability("udid","104ce995950282f9dfaf371bf05ee6b00e7c0027);
</code></pre>
<p>谁能帮帮我?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>从 iOS 8 开始,过多的 <strong>NSLog</strong> 输出会导致 UIAutomation 和 Appium 服务器的内部通信出现死锁。 (<em>阅读这篇文章了解更多信息 <a href="https://github.com/appium/appium/issues/4032" rel="noreferrer noopener nofollow">Appium's Github page</a> </em>)</p>
<p>这会导致这种不希望的结果。</p>
<p>描述了预防性解决方法<a href="https://stackoverflow.com/a/26743671/2311375" rel="noreferrer noopener nofollow">HERE</a> : 这解决了我的问题。我希望它会有所帮助。</p></p>
<p style="font-size: 20px;">关于ios - Iphone 5 Appium 和 jUnit - 应用程序没有元素,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/28432542/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/28432542/
</a>
</p>
页:
[1]