title: How to start IE in private mode in c# with selenium webdriver
body: <p>I'm starting using selenium Webdriver with c# and Visualstudio. </p>
  
  <p>I would like to start Internetexplorer in private mode. So I have not to care about old browsing data during my test. </p>
  
  <p>I searched for quite a long time now to find how to do this. 
  Sadly I could not find a solution. </p>
  
  <p>Could anybody provide me with a working code snippet showing how to start IE in private mode from c# code? </p>
  
  <p>I used the following command to start the browser normally: </p>
  
  <pre><code>Context.Instance.Driver = new InternetExplorerDriver();
  </code></pre>
  
  <p>I tried to add this to make it work: </p>
  
  <pre><code>InternetExplorerOptions options = new InternetExplorerOptions();
  options.BrowserCommandLineArguments = "--private";
  Context.Instance.Driver = new InternetExplorerDriver(options);
  </code></pre>
  
  <p>This was niether a success. </p>
  
  <p>Finally, I tried this also: </p>
  
  <pre><code>InternetExplorerDriverService service = InternetExplorerDriverService.CreateDefaultService();
  
  service.SuppressInitialDiagnosticInformation = true;
  InternetExplorerOptions options = new InternetExplorerOptions();
  options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
  options.BrowserCommandLineArguments = "-private";
  
  Context.Instance.Driver = new InternetExplorerDriver(service, options);
  </code></pre>
  
  <p>I would like to have IE running in private mode for my tests.</p>