HtmlUnit
HtmlUnit is a headless web browser written in Java. It allows high-level manipulation of websites from other Java code, including filling and submitting forms and clicking hyperlinks. It also provides access to the structure and the details within received web pages. HtmlUnit emulates parts of browser behaviour including the lower-level aspects of TCP/IP and HTTP. A sequence such as getPage(url) , getLinkWith("Click here") , click() allows a user to navigate through hypertext and obtain web pages that include HTML, JavaScript, Ajax and cookies. This headless browser can deal with HTTPS security, basic HTTP authentication, automatic page redirection and other HTTP headers. It allows Java test code to examine returned pages either as text, an XML DOM, or as collections of forms, tables, and links. The goal is to simulate real browsers; namely Chrome, Firefox and Edge. The most common use of HtmlUnit is test automation of web pages, but sometimes it can be used for web scraping, or downloading website content.
HtmlUnit is a headless web browser written in Java. It allows high-level manipulation of websites from other Java code, including filling and submitting forms and clicking hyperlinks. It also provides access to the structure and the details within received web pages. HtmlUnit emulates parts of browser behaviour including the lower-level aspects of TCP/IP and HTTP. A sequence such as getPage(url) , getLinkWith("Click here") , click() allows a user to navigate through hypertext and obtain web pages that include HTML, JavaScript, Ajax and cookies. This headless browser can deal with HTTPS security, basic HTTP authentication, automatic page redirection and other HTTP headers. It allows Java test code to examine returned pages either as text, an XML DOM, or as collections of forms, tables, and links. The goal is to simulate real browsers; namely Chrome, Firefox and Edge. The most common use of HtmlUnit is test automation of web pages, but sometimes it can be used for web scraping, or downloading website content. == References== ==Bibliography== pp. 339– ==Further reading== Langer, A. "Extending HtmlUnit for test automatisation of Web applications using AJAX"; Betreuer/in (nen): T. Grechenig, M. Bernhart; 183/1, 2009.
References
No reference rows published for this article.
Cite this article
MLA
"HtmlUnit." encyclopegia.org, 2026, https://encyclopegia.org/wiki/htmlunit. Accessed 23 November 2026.
Chicago
"HtmlUnit." encyclopegia.org. Accessed November 23, 2026. https://encyclopegia.org/wiki/htmlunit.
APA
encyclopegia.org. (2026). HtmlUnit. Retrieved November 23, 2026, from https://encyclopegia.org/wiki/htmlunit
Accessed November 23, 2026 · CC BY-SA 4.0 · citation page · JSON