HtmlUnit

Source: Wikipedia, the free encyclopedia.
HtmlUnit
Initial releaseMay 22, 2002 (2002-05-22)
Stable release
4.0.0 / April 1, 2024; 19 days ago (2024-04-01)
Repository
Written in
JVM)
Available inEnglish
TypeWeb browser
LicenseApache License 2.0
Websitehttps://htmlunit.sourceforge.io/

HtmlUnit is a

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.[1]

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.

Benefits

  • Provides high-level API, taking away lower-level details away from the user.[2]
  • Compared to other WebDriver implementations, HtmlUnitDriver is the fastest to implement.[3]
  • It can be configured to simulate a specific browser.

Drawbacks

  • Element layout and rendering can not be tested.[4]
  • The JavaScript support is not complete, which is one of the areas of ongoing enhancements.

Used technologies

Libraries using HtmlUnit

See also

References

  1. ^ "HtmlUnit Home". Sourceforge. Retrieved 30 August 2019.
  2. . Retrieved 30 August 2019.
  3. ^ "HtmlUnit Driver". Github. Retrieved 30 August 2019.
  4. ^ "Testing HTML Unit". GWT Project. Retrieved 30 August 2019.

Bibliography

Further reading

External links