有人能告诉我如何使用selenium(java)下载Word文件吗?我的下面的代码不起作用。
FirefoxProfile prof = new FirefoxProfile();
prof.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/word");
当我在页面上点击“下载链接或图标”时,会弹出一个提示框来保存下载文件(见下图),我需要在提示框中点击“OK”按钮。请告诉我如何在Firefox中完成这个操作。