我是selenium的新手,我想在特定的自定义文件夹中下载带有selenium chrome web驱动程序的文件.默认情况下,文件在浏览器指定的下载路径中下载.任何人都建议在C#Selenium中自定义路径下载文件的最佳解决方案.
解决方法:
希望对您有所帮助!!
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);