title: How do I get selenium-webdriver to ignore SSL errors in Firefox and PhantomJS?
body: <p>Given these Node dependencies:</p>
  
  <pre><code>{
      "chromedriver": "^2.24.1",
      "cucumber": "^1.3.0",
      "geckodriver": "^1.1.2",
      "phantomjs-prebuilt": "^2.1.12",
      "selenium-webdriver": "^3.0.0-beta-2"
  } 
  </code></pre>
  
  <p>I would like PhantomJS and Firefox to ignore SSL certificates. Here is how my browser.js looks:</p>
  
  <pre><code>require('geckodriver');
  
  // main browser object
  var browserHandle;
  
  // load selenium webdriver and some rules
  var webdriver = require('selenium-webdriver'), 
      By = webdriver.By, 
      until = webdriver.until;
  
  // load phantomjs into webdriver capabilities
  var phantomjs_exe = require('phantomjs-prebuilt').path;
  var customPhantom = webdriver.Capabilities.phantomjs();
  customPhantom.set("phantomjs.binary.path", phantomjs_exe);
  
  webdriver.Builder()
      //.forBrowser('firefox')
      //.forBrowser('phantomjs')
      .withCapabilities(customPhantom)
      .build();
  </code></pre>
  
  <p>Any suggestions with <code>--ignore-ssl-errors=yes</code>? How can I implement it in the code? I want to use only JavaScript, rather than Java.</p>