【发布时间】:2017-04-06 14:28:07
【问题描述】:
升级到 ChromeDriver 2.29 后,“自动下载 'localhost:9000”的默认值设置为“询问”。每当我的测试单击调用下载的链接时,就会打开“另存为”窗口对话框。以前它会静默下载到 Chrome 的默认下载文件夹。
如何在 chromedriver(不是 chrome)中将此设置的默认值更改为“允许”?
我尝试过使用 chrome.switches,但它们不起作用:
chrome.switches=--disable-extensions,--disable-infobars,--allow-insecure-localhost,--safebrowsing-disable-download-protection
Chrome 中的默认设置是所有网站的“允许”。 'http://localhost:9000' 也已添加到例外列表中。
【问题讨论】:
-
作为参考,这里有很多人尝试过的东西:github.com/TheBrainFamily/chimpy/issues/108我不确定是否使用相同的版本。
标签: google-chrome selenium selenium-chromedriver