【发布时间】:2023-03-23 11:57:01
【问题描述】:
自 57 版以来,Google 确实删除了 chrome://plugins 选项。我发现如果我想下载 PDF 文件而不是在 Chrome 查看器中打开它,我需要打开 chrome://settings/content/pdfDocuments 中的开关
有没有办法在 Chrome 驱动程序中设置此选项,例如使用下面的首选项?
private ChromeOptions BuildChromeProfile()
{
var options = new ChromeOptions();
options.AddUserProfilePreference("download.default_directory", DownloadsPath);
options.AddUserProfilePreference("download.prompt_for_download", false);
return options;
}
或者其他方式?
【问题讨论】:
标签: c# google-chrome pdf selenium-chromedriver