title: Selenium driver.manage().deleteAllCookies() doesn't work when using Browser options
body: <p>I have noticed that when using browser Options in selenium, <code>driver.manage().deleteAllCookies()</code> doesn't work.
  Not sure why but here is a snippet of the code.</p>
  
  <pre><code>var profile = new firefox.Profile('./fProfile');
  profile.setPreference("browser.privatebrowsing.autostart",true);
  var fOptions = new firefox.Options();
  fOptions.setProfile(profile); 
  
  var driver = new Builder()
      .withCapabilities({'browserName': 'firefox'})
      .setFirefoxOptions(fOptions)    
      .build();
  driver.get("https://google.com");
  </code></pre>
  
  <p>In the above driver setup the 
  <code>driver.manage().deleteAllCookies()</code> doesn't work
  and  <code>driver.manage().getCookies().then((cookies)=&gt;{console.log(cookies)})</code> returns an <strong>empty</strong> array</p>
  
  <p>However when using this to create the driver the above functions work.</p>
  
  <pre><code>driver= new Builder()
      .withCapabilities({'browserName': 'firefox'})    
      .build();
  </code></pre>
  
  <p>Though I cant use the above code since <em>I <strong>require</strong> the use of a firefox profile.</em></p>
  
  <p>Platform : Node.Js Selenium using geckodriver</p>