How can I add profile preferences to Chrome for Selenium Grid 2 in C#? How can I add profile preferences to Chrome for Selenium Grid 2 in C#? selenium selenium

How can I add profile preferences to Chrome for Selenium Grid 2 in C#?


You'll want to do something like the following:

var chromeOptions = new ChromeOptions();chromeOptions.AddUserProfilePreference("download.default_directory", DownloadPath);chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl");chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");IWebDriver driver = new RemoteWebDriver(new Uri("http://path/to/selenium/server"), chromeOptions.ToCapabilities());