HtmlUnit is a GUI-Less browser for Java programs. It models HTML (Hypertext Markup Language) documents and provides an API (Application Programming Interface) that allows you to invoke pages, fill out forms, click links, etc. just like you do in your normal browser. It has fairly good JavaScript support (which is constantly improving) and is able to work even with quite complex AJAX (Asynchronous JavaScript And Xml) libraries, simulating either Firefox or Internet Explorer depending on the configuration you want to use. It is typically used for testing purposes or to retrieve information from web sites.
The main downside is, just to compile an application that uses HtmlUnit, you need to about 20 supporting jars from diverse sources and put them on the classpath. You need even more to run tests. The authors jerk you around by suggesting you must collect all these jars individually from myriad websites. You don’t. The jars are all included in the htmlunit download.
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/htmlunit.html | J:\mindprod\jgloss\htmlunit.html | |
![]() | Please email your feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording,
broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.210] | |
| Feedback | You are visitor number 11. | |