Menu

#135 add savePageXXX() methods to HtmlPage class

closed
None
5
2012-10-21
2009-01-04
ddv
No

Hi,

While HtmlUnit targets as being a GUI-less browser, I would find neat to have additional methods for HtmlPage class :
- savePage() = save the html content to whatever outputstream
- savePageWithImages() = save the complete html page, just like most browsers do.

Thanks.

Discussion

  • Jim Shew

    Jim Shew - 2009-02-25

    I say AMEN to this. Would be very nice to have.

     
  • Jim Shew

    Jim Shew - 2009-03-11

    saveImageAs would be great also.

     
  • Ahmed Ashour

    Ahmed Ashour - 2009-05-31

    Thanks for your feedback:

    • savePage() to outputstream is not a good option, because you can easily get 'asXml()' and do whatever needed.
    • HtmlPage.saveAs() and HtmlImage.saveAs() have been added. The default behavior of HtmlPage.saveAs() is not ignore <script> (because they are already processed, and saves all the images as real browsers do.</li> </ul> <p>Check latest snapstho from <a href="http://build.canoo.com/htmlunit/artifacts">http://build.canoo.com/htmlunit/artifacts</a>, and advise if you need any mor enhancements.</p></script>
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.