com.meterware.httpunit
Class WebForm

java.lang.Object
  |
  +--com.meterware.httpunit.WebForm

public class WebForm
extends java.lang.Object

This class represents a form in an HTML page. Users of this class may examine the parameters defined for the form, the structure of the form (as a DOM), or the text of the form. They may also create a WebRequest to simulate the submission of the form.


Method Summary
 org.w3c.dom.Node getDOMSubtree()
          Returns a copy of the domain object model subtree associated with this form.
 java.lang.String[] getOptions(java.lang.String name)
          Returns the displayed options defined for the specified parameter name.
 java.lang.String[] getOptionValues(java.lang.String name)
          Returns the option values defined for the specified parameter name.
 java.lang.String[] getParameterNames()
          Returns an array containing the names of the parameters defined for this form, in the order in which they appear.
 java.lang.String getParameterValue(java.lang.String name)
          Returns the default value of the named parameter.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns the multiple default values of the named parameter.
 WebRequest getRequest()
          Creates and returns a web request which will simulate the submission of this form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParameterNames

public java.lang.String[] getParameterNames()
Returns an array containing the names of the parameters defined for this form, in the order in which they appear.

getRequest

public WebRequest getRequest()
Creates and returns a web request which will simulate the submission of this form.

getParameterValue

public java.lang.String getParameterValue(java.lang.String name)
Returns the default value of the named parameter.

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns the multiple default values of the named parameter.

getOptions

public java.lang.String[] getOptions(java.lang.String name)
Returns the displayed options defined for the specified parameter name.

getOptionValues

public java.lang.String[] getOptionValues(java.lang.String name)
Returns the option values defined for the specified parameter name.

getDOMSubtree

public org.w3c.dom.Node getDOMSubtree()
Returns a copy of the domain object model subtree associated with this form.