I am new to selenium, and I would like to know how to get the default path to the browser download folder (I use chrome) in the operating system.
I just found a way to set the default path as follows:
var chromeOptions = new ChromeOptions(); chromeOptions.AddUserProfilePreference("download.default_directory", path); chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl"); chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true"); var driver = new ChromeDriver("Driver_Path", chromeOptions);
source share