Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to take a screenshot with HTML-Unit?

I'm from Germany so excuse me for some bad sentences.

I've coded an web-based application, now I want to do a screenshot of the page in one part of the code.

I'm using HTML-Unit, so I want to know how I can do it with it, it would be bad if I needed to change this in the whole project.

Looking forward for an answer, sincerely, a guest

like image 907
aGuest Avatar asked Jun 20 '11 16:06

aGuest


1 Answers

HtmlUnit never renders a page visually, so there's no image to capture.

There are tools like FireShot that do a good job of capturing web page images; perhaps there is one that can be accessed via an API, or perhaps you could script something up to interact with a browser.

Also see the accepted answer to How can I take fullscreen screenshot of website

like image 114
Rodney Gitzel Avatar answered Nov 15 '22 15:11

Rodney Gitzel