Appium-Xcode-Select引发错误:找不到命令 [英] Appium - xcode-select threw an error: command not found
问题描述
我正在尝试使用Appium在Mac OS X 10.9.3的ios模拟器上测试我的应用程序.我可以正常启动服务器,但是当我尝试运行测试时,出现以下错误:
I am attempting to use Appium to test my app on the ios simulator on my mac OS X 10.9.3. I can start the server fine but when I attempt to run my test I receive the following error:
info: [debug] Error: xcode-select threw an error
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/helpers.js:499:10
at ChildProcess.exithandler (child_process.js:652:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
info: [debug] 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}
info: <-- POST /wd/hub/session 500 31.780 ms - 176
error: xcode-select threw error Error: Command failed: /bin/sh: xcode-select: command not found
我已经检查了bin/sh文件夹,而我的xcode-select文件不在该文件夹中,而是位于/usr/bin.
I have checked the bin/sh folder and my xcode-select file does not live there, instead it is located at /usr/bin.
我是否需要配置appium以在usr/bin文件夹中查找xcode-select文件?如果是这样,我该怎么做?
Do I need to configure appium to look in the usr/bin folder for the xcode-select file? If so how do I do this?
还是我需要做些其他事情?
Or is there something else I need to do?
其他信息: 我正在使用zsh,并且在我的.zshrc文件中列出了以下内容:
Other Information: I am using zsh and in my .zshrc file I have the following listed:
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
(不确定该信息是否有用)
(not sure if that information is useful or not)
我也正在使用rspec/capybara进行测试.我添加了appium_capybara宝石,它安装了所有其他必需的宝石.我添加了以下驱动程序信息:
Also I am using rspec/capybara for my tests. I have added the appium_capybara gem and it installed all other required gems. I have added the following driver information:
desired_caps_ios = {
platform: "Mac",
deviceName: "iPhone Simulator",
platformName: "iOS",
platformVersion: "7.1",
app: "/Applications/Appium.app/Contents/MacOS/my appname/Payload/appname.app"
}
url = "http://localhost:4723/wd/hub" # or a sauce labs url
Capybara.register_driver(:appium) do |app|
appium_lib_options = {
server_url: url
}
all_options = {
appium_lib: appium_lib_options,
caps: desired_caps_ios
}
Appium::Capybara::Driver.new app, all_options
end
Capybara.default_driver = :appium
推荐答案
好的,所以终于回到了这个问题.好像我的问题是我安装Appium的方式一样.我使用appium软件包安装.删除软件包并通过node安装,看来已经解决了路径问题.
OK, so finally got back to this issue. Seems like my problem was the way I installed Appium. I installed using the appium package. Deleted the package and installed via node and it seems to have fixed the path issue.
这篇关于Appium-Xcode-Select引发错误:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!