Download the file in a custom path using Selenium WebDriver

I am new to selenium and I would like to download the file using selenium chrome web driver in a special user folder. By default, the file is downloaded in the specified download path of the browser. Any of them offers the best solution for uploading a file to a user path in C # Selenium.

+4
c # selenium selenium-chromedriver
source share
1 answer

Hope this helps you!

var chromeOptions = new ChromeOptions(); chromeOptions.AddUserProfilePreference("download.default_directory", "Your_Path"); chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl"); chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true"); var driver = new ChromeDriver("Driver_Path", chromeOptions); 
+5
source share

All Articles