HtmlUnit

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found.

HtmlUnit
Htmlunit logo.png
Initial release May 22, 2002 (2002-05-22)
Stable release 2.19 / November 12, 2015 (2015-11-12)
Written in Java
Operating system Cross-platform (JVM)
Available in English
Type Web browser
License Apache License 2.0
Website htmlunit.sourceforge.net

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

The goal is to simulate real browsers; namely Chrome, Firefox ESR 38, Internet Explorer 8 and 11, and Edge (experimental).

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 implementation.[3]
  • It can be configured to simulated specific Browser.

Drawbacks

  • Elements layout and rendering can not be tested.[4]
  • The JavaScript support is still not complete. And this is usually the main area of enhancements.

Used technologies

Libraries using HtmlUnit

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.

Bibliography

  • Lua error in package.lua at line 80: module 'strict' not found. pp. 339– (subscription required)

Further reading

  • Langer, A. "Extending HtmlUnit for test automatisation of Web applications using AJAX"; Betreuer/in (nen): T. Grechenig, M. Bernhart; 183/1, 2009. (subscription required)
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found. (subscription required)

External links