Search code examples
rubymacoscucumberheadless

Can't get cucumber tests running in headless on OSX - works on ubuntu?


In my env.rb file, I have this:

if ENV["HEADLESS"] == 'true'
    require "headless"
    @headless = Headless.new
    @headless.start
end

This works fine in Ubuntu, but not in OSX. The browser still pops up. What do I need to do to make this work in OSX?


Solution

  • Headless won't hide most OSX applications. This is the intended behaviour. Headless is meant to run graphical applications on a Linux server.

    See https://github.com/leonid-shevtsov/headless/issues/31#issuecomment-8933108 for a detailed explanation.