2014-07-16 72 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機器上獲得「通過」或「失敗」更新。