我正在尝试在 Windows 7 上使用 headless 和 watir。
env.rb
if ENV['HEADLESS']
headless = Headless.new
headless.start
at_exit do
headless.destroy
end
end
当我运行测试时,出现以下错误
$ cucumber --profile bat
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
Using the bat profile...
No such file or directory - which Xvfb (Errno::ENOENT)
c:/Ruby193/lib/ruby/gems/1.9.1/gems/headless-0.3.1/lib/headless/cli_util.rb:4:in ``'
关于如何解决这个问题有什么想法吗?或者这只适用于Linux?
最佳答案
Headless gem 仅适用于 Linux。它不适用于 Mac 或 Windows。
关于ruby-on-rails-3 - 将 watir 与 headless 结合使用时,Windows 上出现 Xvfb 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13563141/