title: Unable to set DesiredCapabilities for HtmlUnitDriver - Selenium
body: <p>I am using this code to set Capabilities for my HtmlUnitDriver: </p>
  
  <pre><code>DesiredCapabilities caps = DesiredCapabilities.firefox();
  caps.setJavascriptEnabled(true);  
  String browsername = getBrowser();
  Platform platform = getPlatform();
  System.out.println(browsername + " , " + platform.name());
  caps.setBrowserName(browsername);
  caps.setPlatform(platform); 
  
  HtmlUnitDriver driver = new HtmlUnitDriver(caps); 
  driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 
  
  Capabilities caps2 = driver.getCapabilities();
  System.out.println(caps2.getBrowserName() + " , " + caps2.getPlatform());
  </code></pre>
  
  <p>But I get this output:</p>
  
  <pre><code>opera , XP
  htmlunit , WIN8_1
  </code></pre>
  
  <p>What am I missing?</p>