| Interface | Description |
|---|---|
| DialogResponder |
Interface for an object to supply user responses to dialogs.
|
| DNSListener |
A listener for DNS Requests.
|
| HTMLElement |
An interface which defines the common properties for an HTML element, which can correspond to any HTML tag.
|
| HTMLElementPredicate |
An interface which can be used to define matching criteria for an HTML element.
|
| HtmlErrorListener | Deprecated
as of 1.5.2, use HTMLParserListener
|
| HTMLSegment |
Represents the parse tree for a segment of HTML.
|
| WebClientListener |
A listener for messages sent and received by a web client.
|
| WebWindowListener |
A listener for web window openings and closings.
|
| Class | Description |
|---|---|
| Base64 |
A utility class to convert to and from base 64 encoding.
|
| BlockElement |
Represents a block-level element such as a paragraph or table cell, which can contain other elements.
|
| Button |
A button in a form.
|
| ClientProperties |
A class which represents the properties of a web client.
|
| DialogAdapter | |
| FormControl |
Represents a control in an HTML form.
|
| FormParameter |
Represents the aggregate of all form controls with a particular name.
|
| FrameSelector |
An immutable class which describes the position of a frame in the window hierarchy.
|
| GetMethodWebRequest |
An HTTP request using the GET method.
|
| HeaderOnlyWebRequest |
A web request which has no information in its message body.
|
| HeadMethodWebRequest |
A web request using the HEAD method.
|
| HTMLPage |
This class represents an HTML page returned from a request.
|
| HttpHeader | |
| HttpsProtocolSupport |
Encapsulates support for the HTTPS protocol.
|
| HttpUnitOptions |
A collection of global options to control HttpUnit's behavior.
|
| HttpUnitUtils |
Utility code shared by httpunit and servletunit.
|
| MessageBodyWebRequest |
A web request which contains a non-empty message body.
|
| MessageBodyWebRequest.InputStreamMessageBody |
A method request message body read directly from an input stream.
|
| NodeUtils |
Some common utilities for manipulating DOM nodes.
|
| ParsedHTML | |
| PostMethodWebRequest |
An HTTP request using the POST method.
|
| PutMethodWebRequest |
A web request using the PUT protocol.
|
| RadioButtonFormControl | |
| RadioGroupFormControl |
Radio button control
|
| ResetButton |
Represents a form 'reset' button.
|
| SubmitButton |
This class represents a submit button in an HTML form.
|
| TableCell |
A single cell in an HTML table.
|
| TableRow | |
| TextBlock |
A class which represents a block of text in a web page.
|
| WebApplet |
This class represents the embedding of an applet in a web page.
|
| WebClient |
The context for a series of web requests.
|
| WebClient.HeaderDictionary | |
| WebConversation |
The context for a series of HTTP requests.
|
| WebForm |
This class represents a form in an HTML page.
|
| WebImage |
Represents an image in an HTML document.
|
| WebLink |
This class represents a link in an HTML page.
|
| WebList |
Represents an HTML list.
|
| WebRequest |
A request sent to a web server.
|
| WebRequestSource |
Base class for objects which can be clicked to generate new web requests.
|
| WebResponse |
A response to a web request from a web server.
|
| WebTable |
This class represents a table in an HTML page.
|
| WebWindow |
A window managed by a
WebClient. |
| Exception | Description |
|---|---|
| AuthorizationRequiredException |
This exception is thrown when an unauthorized request is made for a page that requires authentication.
|
| HttpException |
This exception is thrown when an Http error (response code 4xx or 5xx) is detected.
|
| HttpInternalErrorException |
This exception is thrown when an internal error is found on the server.
|
| HttpNotFoundException |
This exception is thrown when the desired URL is not found.
|
| IllegalRequestParameterException |
This exception is thrown on an attempt to set a form parameter in a way not possible from a browser.
|
| RecursiveRedirectionException |
Class used to indicate when a request to a resource resulted in an HTTP
redirect response that lead to a recursive loop of redirections
|
| ScriptException |
An exception thrown when there is a problem running a script.
|
| UnsupportedActionException |
An exception thrown when an action URL is not supported.
|
WebConversation to which it should submit an
initial http request using the
getResponse method. With each
subsequent step,
it will typically examine the response either textually or as a DOM, and create new
requests based on either submitting a form or clicking on a link.
jar directory:
document.write() will only work with NekoHTML.
import com.meterware.httpunit.*;
import java.io.IOException;
import java.net.MalformedURLException;
import org.xml.sax.*;
public class Example {
public static void main( String[] params ) {
try {
WebConversation conversation = new WebConversation();
WebResponse response = conversation.getResponse( "http://www.meterware.com/servlet/TopSecret" );
System.out.println( response );
WebForm loginForm = response.getForms()[0];
loginForm.setParameter( "name", "master" );
response = loginForm.submit();
System.out.println( response );
} catch (Exception e) {
System.err.println( "Exception: " + e );
}
}
}
Please direct any questions to Russell Gold.