How to disable download window in firefox with watir-webdriver?

空扰寡人 提交于 2019-12-02 01:18:55
Erki M.

As per documentation, you should use the browser.helperApps.neverAsk.saveToDisk preference to achieve this. Value is defined as

A comma-separated list of MIME types to save to disk without asking what to use to open the file. Default value is an empty string.

I am not very good at Ruby, but it will probably look something like

profile["browser.helperApps.neverAsk.saveToDisk"] = "text/plain, application/octet-stream"

Just use the correct MIME type.


I also found this, this and this answer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!