title: How can I add profile preferences to Chrome for Selenium Grid 2 in C#?
body: <p>This is how I add profile preferences to Chrome for Local Auto-test runs and TeamCity(CI):</p>
  
  <pre><code>Capabilities = DesiredCapabilities.Chrome();
  
  var chromeOptions = new ChromeOptionsWithPrefs();
  chromeOptions.AddUserProfilePreference("download.default_directory", DownloadPath);
  chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl");
  chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");
  
  return new ChromeDriver(chromeDriverPath, chromeOptions);
  </code></pre>
  
  <p>But when I create new 'RemoteWebDriver', I must send it a hub URL and 'Capabilities', this way I send profile preferences to Firefox (to RemoteWebDriver):</p>
  
  <pre><code>var profile = new FirefoxProfile();
  
  Capabilities = DesiredCapabilities.Firefox();
  
  profile.SetPreference("browser.helperApps.alwaysAsk.force", false); 
  profile.SetPreference("browser.download.useDownloadDir", true);
  profile.SetPreference("browser.download.folderList", 2);
  profile.SetPreference("browser.download.dir", DownloadPath);
  profile.SetPreference("browser.helperApps.neverAsk.saveToDisk",
     "application/zip, application/octet-stream");
  
  Capabilities.SetCapability(FirefoxDriver.ProfileCapabilityName, profile.ToBase64String());
  
  return Capabilities;
  </code></pre>
  
  <p>Can someone help me, I need to do the same thing to Chrome as I did to Firefox. Basically what I need, is that I could change the default path for downloading files.</p>