Committed to Code

HtmlUnit is a "browser for Java programs". It models HTML documents and provides an API 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 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.

No managers have claimed this project yet. Claim this position

Project Tags Tagged as html web programming development webtest unit javascript test htmlunit java browser testing

Code Analysis


News

2009 JavaOne HtmlUnit technical session online content

HtmlUnit is a pure java GUI-Less browser, which allows high-level manipulation of web pages, such as filling forms, clicking links, accessing attributes and values of specific elements within the pages, you do not have to create lower-level requests ... [More] of TCP/IP or HTTP, but just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed.

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.

2009 JavaOne conference website now has the online version of the technical session "HtmlUnit: An Efficient Approach to Testing Web Applications
TS-4238"

You can view it at http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-4238&yr=2009&track=soa (1 comments) [Less]


2009 JavaOne HtmlUnit technical session online content

HtmlUnit is a pure java GUI-Less browser, which allows high-level manipulation of web pages, such as filling forms, clicking links, accessing attributes and values of specific elements within the pages, you do not have to create lower-level requests ... [More] of TCP/IP or HTTP, but just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed.

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.

2009 JavaOne conference website now has the online version of the technical session "HtmlUnit: An Efficient Approach to Testing Web Applications
TS-4238"

You can view it at http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-4238&yr=2009&track=soa (0 comments) [Less]


HtmlUnit 2.5, a headless java browser, released

A new release of the GUI-Less java browser is available, which allows high-level manipulation of web pages, such as filling forms, clicking links, accessing attributes and values of specific elements within the pages; you do not have to create ... [More] lower-level requests of TCP/IP or HTTP, but just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed.

The most common use of HtmlUnit is test automation of web pages (even with complex JavaScript libraries, like jQuery and Google Web Toolkit), but sometimes it can be used for web scraping, or downloading website content.

The main enhancements of this release:
- Improved JavaScript support, particularly full support for MooTools, adding to already supported Google Web Toolkit, jQuery, Mochikit and Sarissa
- Repackaged Rhino classes to allow the use of HtmlUnit and a regular Rhino version in the same project
- Support all HTML elements
- Experimental WebClient.waitForBackgroundJavaScript() and WebClient.waitForBackgroundJavaScriptStartingBefore() for simple, fast and deterministic AJAX testing
- Reworked handling of background JavaScript tasks using Java 5 executors
- And as usual, various bug fixes

You can find more information in the official website (http://htmlunit.sourceforge.net/), the development team is looking forward to getting your feedback. (0 comments) [Less]


HtmlUnit 2.5, a headless java browser, released

A new release of the GUI-Less java browser is available, which allows high-level manipulation of web pages, such as filling forms, clicking links, accessing attributes and values of specific elements within the pages; you do not have to create ... [More] lower-level requests of TCP/IP or HTTP, but just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed.

The most common use of HtmlUnit is test automation of web pages (even with complex JavaScript libraries, like jQuery and Google Web Toolkit), but sometimes it can be used for web scraping, or downloading website content.

The main enhancements of this release:
- Improved JavaScript support, particularly full support for MooTools, adding to already supported Google Web Toolkit, jQuery, Mochikit and Sarissa
- Repackaged Rhino classes to allow the use of HtmlUnit and a regular Rhino version in the same project
- Support all HTML elements
- Experimental WebClient.waitForBackgroundJavaScript() and WebClient.waitForBackgroundJavaScriptStartingBefore() for simple, fast and deterministic AJAX testing
- Reworked handling of background JavaScript tasks using Java 5 executors
- And as usual, various bug fixes

You can find more information in the official website (http://htmlunit.sourceforge.net/), the development team is looking forward to getting your feedback. (0 comments) [Less]


HtmlUnit in JavaOne

HtmlUnit is a pure java GUI-Less browser, which allows high-level manipulation of web pages, such as filling forms, clicking links, accessing attributes and values of specific elements within the pages, you do not have to create lower-level requests ... [More] of TCP/IP or HTTP, but just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed.

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.

2009 JavaOne, the biggest Java conference in San Francisco (May 31 - June 05), is going to include a session titled "HtmlUnit: An Efficient Approach to Testing Web Applications", presented by committers Daniel Gredler and Ahmed Ashour.

Attendees will learn about
- The two approaches to Web app integration testing: browser simulation and browser driving
- The cons of the browser simulation approach
- The pros of the browser simulation approach
- Key extension points provided by HtmlUnit
- Wrappers that enable you to hedge your bets and switch between the two approaches

More information can be found in http://java.sun.com/javaone/2009/sessions.jsp (0 comments) [Less]


Read all HtmlUnit articles…

Edit RSS feeds.