开发者

HtmlUnit download attachments [closed]

开发者 https://www.devze.com 2023-03-15 22:37 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this po
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 9 years ago.

Improve this question 开发者_运维技巧

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号