HtmlUnit download attachments [closed]

大城市里の小女人 提交于 2019-12-03 09:36:59

问题


I need to save files from websites Using HtmlUnit. I am currently navigating to pages that have several anchors that use javascript onClick()="DownloadAttachment('attachmentId')" to get the files. The files can be of pretty much any type ( xls, doc, txt, pdf, jpg, etc). So far though I've been unable to find resources or examples that show how to save files using htmlUnit. I've been trying mainly to get AttachmentHandler to work for this as it seems the most likely to work, but have been unsuccessful. I was wondering if anyone else has managed to download files using HtmlUnit and could assist?

来源:https://stackoverflow.com/questions/6497098/htmlunit-download-attachments

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