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 gem 并安装了所有其他必需的 gem.我添加了以下驱动程序信息:
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 包安装.删除包并通过节点安装,似乎解决了路径问题.
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屋!