当前位置: 代码迷 >> Web前端 >> Webdriver设立Firefox自动下载
  详细解决方案

Webdriver设立Firefox自动下载

热度:325   发布时间:2013-08-06 16:47:25.0
Webdriver设置Firefox自动下载

?

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("browser.download.downloadDir", "c:\\excelData");
profile.setPreference("browser.download.defaultFolder", "c:\\excelData");
profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "text/csv");
driver = new FirefoxDriver(profile);

?

?

目前可以自动保存到Firefox默认的下载位置,但是没有保存到指定的位置

Firefox profiel 配置

  相关解决方案