go-ios
go-ios copied to clipboard
Error 'Could not determine Xcode version:' when starting an Appium session
I am trying to run automated tests on an iPad using Appium, and I would like to use go-ios to execute these tests without needing a Mac. I installed WebDriverAgent on the iPad using a MacBook, and now, after connecting the iPad to my Windows PC, I am trying to get go-ios to work.
So far, I have successfully:
-
Started a tunnel using the command: "ios tunnel start"
-
Started WebDriverAgent using the command: "ios runwda"
At this point, after starting Appium on my PC, I am trying to launch a test, but in the Appium logs, I get the following error:
"Failed to create session. An unknown server-side error occurred while processing the command. Original error: Could not determine Xcode version: Cannot determine the path to Xcode by running 'xcode-select -p' command. Original error: 'xcode-select' executable is not found neither in the process working folder"
Am I doing something wrong? Or what can I do to successfully run a test with Appium? Thanks a lot to everyone for the support!
I get the same thing, it seems to me that xctest should be run only through go-ios and not appium
I found a workaround for this issue by adding the following capability to Appium session: "appium:webDriverAgentUrl": "http://<ipad_ip_address>:8100". This way, Appium skips the xcode-select call, and I was able to start the session directly on the iPad connected to my Windows PC.
if (_.isEmpty(this.xcodeVersion) && (this.isXcodebuildNeeded() || this.isSimulator())) {
// no `webDriverAgentUrl`, or on a simulator, so we need an Xcode version
this.xcodeVersion = await getAndCheckXcodeVersion();
}
This is the portion of code of appium-xcuitest-driver (lib/driver.js) where you can see that the getAndCheckXcodeVersion() function is called only if the webDriverAgentUrl capability is not provided, or if the test is being run on a simulator