2014-07-16 73 views
3

我想在连接到我的Windows机器的iPHONE 5上运行我的脚本。我得到以下错误:iOS支持windows上的appium

ERROR: debug: Appium request initiated at /wd/hub/session info: Configuring Safari session ERROR: debug: Request received with params: {"desiredCapabilities":{"browserName":"Safari","device":"iPhone 5s white"}} info: Trying to use mobile safari, version 18 info: Looking for built in app MobileSafari ERROR: error: xcode-select threw error Error: Command failed: 'xcode-select' is not recognized as an internal or external command, ERROR: operable program or batch file. ERROR: info: Got configuration error, not starting session ERROR: error: Stderr: 'xcode-select' is not recognized as an internal or external command, ERROR: operable program or batch file. ERROR: ERROR: error: Stdout: ERROR: error: Could not prepare mobile safari with version '18': Error: xcode-select threw an error ERROR: error: Failed to start an Appium session, err was: Error: xcode-select threw an error info: Cleaning up appium session info: Error: xcode-select threw an error at D:\QM_Work\AppiumForWindows-1.0.0\AppiumForWindows\node_modules\appium\lib\helpers.js:523:10 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process.ChildProcess._handle.onexit (child_process.js:810:5) info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: xcode-select threw an error)","origValue":"xcode-select threw an error"},"sessionId":null} POST /wd/hub/session 500 1379ms - 204b

+1

那么错误告诉我,appium正在寻找Xcode,它不适用于Windows。看起来你只能在OSX上使用appium for iOS。 – rckoenes

+0

任何其他解决方法,以使其工作? – user3801774

回答

0

因为Appium需要仪器和其他一些不能为iOS的测试使用Windows原生的,仅限于OSX的库,以告诉手机该做什么。 (source

解决方法:

  • 寻找到一个Mac mini的托管服务,在那里你可以在虚拟机上运行的iOS测试。
  • 购买的Mac mini
1

它可以从Windows机器,但不运行测试你可能想。你仍然需要一个mac。这里是要求:

在Mac您的网络Appium服务器上运行 上已经安装了正确 Appium环境有机器 上的.app如果你有这三个reqirements满足,不存在对没有防火墙拦截网络访问mac然后你可以做到这一点。您将不得不在Windows计算机上进行实际测试,而不是将安装方法中的127.0.0.1:8080指定为Appium服务器的IP地址,而将其替换为:yourmacsipaddress:8080,这应该正确执行测试。

请记住,您必须在Windows机器上运行的测试中指定.app的路径。但问题在于路径必须是mac中的.app路径,而不是Windows机器上的路径。

因此,测试将从您的Windows机器运行,但应用程序的安装,自动化和测试将在Mac上完成,但您将在Windows机器上获得“通过”或“失败”更新。