title: Not able to open Chrome headless from Selenium
body: <p>I am using maven here.Here is my Selenium code:</p>
  
  <pre><code>DesiredCapabilities capb = DesiredCapabilities.chrome();
      capb.setCapability("chrome.binary","/Applications/Google Chrome.app/Contents/MacOS/Google Chrome");
      ChromeOptions options = new ChromeOptions();
      options.addArguments("--headless","--disable-gpu", "--no-sandbox","--remote-debugging-port=9222");
      capb.setCapability(ChromeOptions.CAPABILITY, options);
      System.setProperty("webdriver.chrome.driver","/Users/nitinkumar/TEST/chromedriver");
      try{
      ChromeDriver driver = new ChromeDriver(capb);
      driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
      driver.get("https://qa.cmnetwork.co");
      driver.quit();
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>when I run "mvn test" it starts the chrome in GUI mode. but It should open in Headless mode. I have <strong>chrome vesrion 59.0</strong>, <strong>OS X yosemite(10.10.5)</strong>, <strong>chromedriver 2.30</strong> and <strong>Selenium 3.4.0</strong>.</p>