# Class WebImage

java.lang.Object
com.meterware.httpunit.WebRequestSource
com.meterware.httpunit.WebImage

All Implemented Interfaces:
  `HTMLElement, com.meterware.httpunit.protocol.ParameterCollection, ScriptingEventHandler`

public class WebImage extends WebRequestSource
Represents an image in an HTML document.

Author:
  Russell Gold

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`WebImage.Scriptable`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`addPresetParameter(String name, String value)`
Records a parameter defined by including it in the destination URL.
`String`
`getAltText()`
`protected String`
`getEmptyParameterValue()`
`WebLink`
`getLink()`
`String`
`getName()`
Returns the name associated with this request source.
`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`
`getSource()`
`ScriptableDelegate`
`newScriptable()`
`void`
`recordParameters(com.meterware.httpunit.protocol.ParameterProcessor processor)`
Iterates through the parameters in this holder, recording them in the supplied parameter processor.
`protected void`
`setDestination(String destination)`

### Methods inherited from class WebRequestSource

`doEvent, doEventScript, getAttribute, getBaseResponse, getBaseURL, getClassName, getCurrentFrameContents, getDestination, getDOMSubtree, getElement, getFragmentIdentifier, getFrame, getHTMLPage, getID, getNode, getPageFrame, getParentDelegate, getRelativeURL, getScriptingHandler, getTagName, getTarget, getText, getTitle, handleEvent, isSupportedAttribute, loadDestinationParameters, removeAttribute, setAttribute, setTargetAttribute, submitRequest, submitRequest`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getName

public String getName()
Description copied from class: `WebRequestSource`
Returns the name associated with this request source.

Specified by:
  `getName` in interface `HTMLElement`
Overrides:
  `getName` in class `WebRequestSource`

### getSource

public String getSource()

### getAltText

public String getAltText()

### getLink

public WebLink getLink()

### newScriptable

public ScriptableDelegate newScriptable()

### getRequest

public WebRequest getRequest()
Creates and returns a web request which will simulate clicking on this link.

Specified by:
  `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.

Specified by:
  `getParameterNames` in class `WebRequestSource`

### getParameterValues

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

Specified by:
  `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.

Specified by:
  `addPresetParameter` in class `WebRequestSource`

### getEmptyParameterValue

protected String getEmptyParameterValue()

Specified by:
  `getEmptyParameterValue` in class `WebRequestSource`

### setDestination

protected void setDestination(String destination)

Overrides:
  `setDestination` in class `WebRequestSource`

### recordParameters

public void recordParameters(com.meterware.httpunit.protocol.ParameterProcessor processor) throws IOException
Iterates through the parameters in this holder, recording them in the supplied parameter processor.

Throws:
  `IOException`