How to download a file using Watir 6.0

早过忘川 提交于 2019-12-07 01:05:30
titusfortner

For Firefox, we'll have that supported in the next release of Selenium.

For Chrome you need to follow the code in the documentation:

prefs = {
  download: {
    prompt_for_download: false, 
    default_directory: "/path/to/dir"
  }
}

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