<?xml version="1.0"?>
<document xmlns:j="jelly:core">

    <properties>
        <title>Welcome to HtmlUnit</title>
        <revision>$Revision: 5943 $</revision>
        <author email="mbowler@GargoyleSoftware.com">Mike Bowler</author>
        <author email="mguillem@users.sourceforge.net">Marc Guillemot</author>
        <author email="asashour@users.sourceforge.net">Ahmed Ashour</author>
    </properties>

    <body>
        <section name="HtmlUnit">
            <p>
                HtmlUnit is a "GUI-Less 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.
            </p>
            <p>
                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.
            </p> 
            <p>
                It is typically used for testing purposes or to retrieve information from web sites.
            </p>
            <p>
                HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate
                a browser for testing purposes and is intended to be used within another testing
                framework such as <a href="http://www.junit.org/">JUnit</a> or <a href="http://www.testng.org/">TestNG</a>.
                Refer to the document <a href="gettingStarted.html">"Getting Started with HtmlUnit"</a>
                for an introduction.
            </p>
            <p>
                HtmlUnit is used as the underlying "browser" by different Open Source tools like <a href="http://webtest.canoo.com/">Canoo WebTest</a>,
                <a href="http://jwebunit.sourceforge.net/">JWebUnit</a>, <a href="http://webdriver.googlecode.com/">WebDriver</a>, <a href="http://www.jboss.org/jsfunit/">JSFUnit</a>,
                <a href="http://celerity.rubyforge.org/">Celerity</a>, ...
            </p>
            <p>
                HtmlUnit was originally written by
                <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> of
                <a href="http://www.GargoyleSoftware.com">Gargoyle Software</a>
                and is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache 2 license</a>.  
                Since then, it has received many contributions from <a href="team-list.html">
                other developers</a>, and would not be where it is today without their
                assistance.
            </p>
        </section>

        <section name="Where to find...">
            <p>
                <dl>
                    <dt>Latest build</dt>
                    <dd>
                        <a href="http://build.canoo.com/htmlunit">Cruise Control server</a> 
                    </dd>
                    
                    <dt>Latest release <date>Aug 5, 2010</date></dt>
                    <dd>
                        <a href="https://sourceforge.net/projects/htmlunit/files/">
                            version 2.8
                        </a>
                    </dd>
                </dl>
            </p>
            <p>
                Documentation
                <ul>
                    <li>
                        <a href="apidocs/index.html">Javadoc API documentation</a>
                    </li>
                    <li>
                        <a href="changes-report.html">Change history</a>
                    </li>
                    <li>
                        <a href="faq.html">Frequently Asked Questions</a>
                    </li>
                    <li>
                        <a href="http://sourceforge.net/projects/htmlunit">HtmlUnit project page on SourceForge.net</a>
                    </li>
                    <li>
                        <a href="http://sourceforge.net/mail/?group_id=47038">HtmlUnit mailing list</a>
                    </li>
                    <li>
                        <a href="codingConventions.html">HtmlUnit coding conventions</a>
                    </li>
                    <li>
                        <a href="submittingBugs.html">Submitting bugs</a>
                    </li>
                    <li>
                        <a href="submittingPatches.html">Submitting patches</a>
                    </li>
                    <li>
                        <a href="gettingLatestCode.html">Getting and building the most recent code</a>
                    </li>
                </ul>
            </p>

            <p>
                Tutorials
                <ul>
                    <li>
                        <a href="gettingStarted.html">Getting Started</a>
                    </li>
                    <li>
                        <a href="table-howto.html">Tables</a>
                    </li>
                    <li>
                        <a href="logging.html">Logging</a>
                    </li>
                    <li>
                        <a href="window-howto.html">Windows and frames</a>
                    </li>
                    <li>
                        <a href="keyboard-howto.html">Keyboard navigation</a>
                    </li>
                </ul>
            </p>
        </section>

        <section name="Features">
            <p>
                <ul>
                    <li>Support for the HTTP and HTTPS protocols</li>
                    <li>Support for cookies</li>
                    <li>Ability to specify whether failing responses from the server should throw
                    exceptions or should be returned as pages of the appropriate type (based on content
                    type)</li>
                    <li>Support for submit methods POST and GET (as well as HEAD, DELETE, ...)</li>
                    <li>Ability to customize the request headers being sent to the server</li>
                    <li>Support for HTML responses
                        <ul>
                            <li>Wrapper for HTML pages that provides easy access to all information
                            contained inside them</li>
                            <li>Support for submitting forms</li>
                            <li>Support for clicking links</li>
                            <li>Support for walking the DOM model of the HTML document</li>
                        </ul>
                    </li>
                    <li>Proxy server support</li>
                    <li>Support for basic and <a href="ntlm.html">NTLM</a> authentication</li>
                    <li>Excellent JavaScript support (see <a href="#JavaScript_Support">the JavaScript section</a> below)</li>
                </ul>
            </p>
        </section>

        <section name="Installation">
            <p>
                Place <a href="dependencies.html">all the required jars</a> in your classpath.
                All of these can be found in the lib directory of the HtmlUnit installation.
            </p>
        </section>

        <section name="JavaScript Support">
            <p>
                HtmlUnit provides excellent JavaScript support, simulating the behavior of the configured browser (Firefox or Internet Explorer).
                It uses the Rhino JavaScript engine for the core language (plus workarounds for some Rhino bugs) and provides the implementation
                for the objects specific to execution in a browser.
            </p>
            <p>
                The unit tests of some well-known JavaScript libraries are included in HtmlUnit's own unit tests; based on these unit
                tests, the following libraries are known to work well with HtmlUnit:
                <ul>
                    <li>jQuery 1.2.6: Full support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery126Test.java">here</a>)</li>
                    <li>MochiKit 1.4.1: Full support (see unit tests <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/MochiKitTest.java">here</a>)</li>
                    <li>GWT 2.0.0: Full support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/GWT20Test.java">here</a>)</li>
                    <li>Sarissa 0.9.9.3: Full support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Sarissa0993Test.java">here</a>)</li>
                    <li>MooTools 1.2.1: Full support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/MooTools121Test.java">here</a>)</li>
                    <li>Prototype 1.6.0: Very good support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Prototype160Test.java">here</a>)</li>
                    <li>Ext JS 2.2: Very good support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/ExtJS22Test.java">here</a>)</li>
                    <li>Dojo 1.0.2: Good support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Dojo102Test.java">here</a>)</li>
                    <li>YUI 2.3.0: Good support (see unit test <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/YuiTest.java">here</a>)</li>
                </ul>
            </p>
            <note title="Disabling JavaScript support">
                <p>
                    To disable JavaScript processing for one WebClient, call WebClient.setJavaScriptEnabled(false).
                </p>
            </note>
            <p>
                JavaScript code is executed just like in normal browsers when the page loads or when an handler is triggered.
                Additionally HtmlUnit provides the ability to inject code into an existing page via
                HtmlPage.executeJavascript(String yourJsCode).
            </p>
            <p>
                Refer to the <a href="changes-report.html">changes document</a> for details on what is being added.
            </p>
        </section>
    </body>
</document>
