Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.meterware.httpunit
Class WebLink

    java.lang.Object
      |
      +--com.meterware.httpunit.ParameterHolder
            |
            +--com.meterware.httpunit.WebRequestSource
                  |
                  +--com.meterware.httpunit.WebLink

public class WebLink
extends WebRequestSource

This class represents a link in an HTML page. Users of this class may examine the structure of the link (as a DOM), or create a `WebRequest` to simulate clicking on the link.

Author:
  Russell Gold,

  Method Summary
  `protected void` | `addPresetParameter(String name, String value)` Records a parameter defined by including it in the destination URL.
  `String` | `asText()` Returns the text value of this link.
  `String[]` | `getParameterNames()` Returns an array containing the names of any parameters defined as part of this link's URL.
  `String[]` | `getParameterValues(String name)` Returns the multiple default values of the named parameter.
  `WebRequest` | `getRequest()` Creates and returns a web request which will simulate clicking on this link.
  `String` | `getURLString()` Returns the URL referenced by this link.

  Methods inherited from class com.meterware.httpunit.WebRequestSource
  `getBaseURL, getDestination, getDOMSubtree, getID, getName, getNode, getTarget, loadDestinationParameters`

  Methods inherited from class java.lang.Object
  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Method Detail

  ### getURLString

      public String getURLString()

    Returns the URL referenced by this link. This may be a relative URL.

  ### asText

      public String asText()

    Returns the text value of this link.

  ### getRequest

      public WebRequest getRequest()

    Creates and returns a web request which will simulate clicking on this link.
    Overrides:
      `getRequest` in class `WebRequestSource`

  ### getParameterNames

      public String[] getParameterNames()

    Returns an array containing the names of any parameters defined as part of this link's URL.
    Overrides:
      `getParameterNames` in class `WebRequestSource`

  ### getParameterValues

      public String[] getParameterValues(String name)

    Returns the multiple default values of the named parameter.
    Overrides:
      `getParameterValues` in class `WebRequestSource`

  ### addPresetParameter

      protected void addPresetParameter(String name,
                                        String value)

    Description copied from class: `WebRequestSource`
    Records a parameter defined by including it in the destination URL. The value can be null, if the parameter name was not specified with an equals sign.
    Overrides:
      `addPresetParameter` in class `WebRequestSource`

  Overview | Package | Class | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD