Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS support for appium on windows

I am trying to run my script on iPHONE 5 which is connected to my windows machine. I am getting below error:

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

like image 707
user3801774 Avatar asked Mar 19 '23 01:03

user3801774


2 Answers

As mentioned in the doumenations of Appium you need OSX to test iOS:

http://appium.io/slate/en/master/?ruby#toc_25

like image 69
rckoenes Avatar answered Mar 29 '23 17:03

rckoenes


It is possible to run the tests from a windows machine but not the way you are probably thinking. You will still need a mac. Here are the requirements:

A mac on your network with Appium server running Has Appium environment installed properly Has the .app on the machine If you have these three reqirements fulfilled and there is no firewall blocking network access to the mac then you can do it. You will have to actual tests on the windows machine but instead of specifying 127.0.0.1:8080 in the setup method as the IP address of Appium server you will replace it with this: yourmacsipaddress:8080 and this should execute the test properly.

Remember that you have to specify the path of the .app in the test which is running from your windows machine. But the catch is that the path has to be the path of the .app in the mac and not on your windows machine.

So the tests will run from your Windows machine but the installation of the app, the automation, and the testing will be done on the mac but you will get the "pass" or "fail" update on your Windows machine.

like image 42
qazimusab Avatar answered Mar 29 '23 16:03

qazimusab