title: How to get Chrome headless to autofill username / passwords?
body: <p>How can I get Chrome launched in <a href="https://developers.google.com/web/updates/2017/04/headless-chrome" rel="nofollow noreferrer">headless mode</a> to autofill any stored username and passwords?</p>
  
  <p>Launched normally from the command line, autofill works as expected. But with the <code>--headless</code> option, autofill does not seem to be happening (for the same pages &amp; fields).  I'm using the <a href="https://chromedevtools.github.io/devtools-protocol/" rel="nofollow noreferrer">Chrome DevTools Protocol</a> to remotely control the browser in both cases.</p>
  
  <p>I am specifying a <code>--user-data-dir</code> that is the same in both "headed" and headless cases.</p>
  
  <p>Version info: Google Chrome 62.0.3202.94 on Ubuntu 16.04.3 LTS</p>