使用Selenium WebDriver在自定义路径下载文件
我是selenium的新手,我想在特定的自定义文件夹中下载带有selenium chrome web驱动程序的文件。 默认情况下,文件是在浏览器指定的下载路径下载。 任何人都建议在C#Selenium中自定义路径下载文件的最佳解决方案。
希望对您有所帮助!!
上述就是C#学习教程:使用Selenium WebDriver在自定义路径下载文件分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!
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);
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/cdevelopment/1015886.html