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.
|
|
available on the web at: |
http://mindprod.com/jgloss/htmlunit.html |
optional Replicator mirror
|
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 :
| |
| Blog | Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[107.22.127.92] |
|
| Feedback | You are visitor number 11. | |