com.meterware.httpunit

Class Button

public class Button extends FormControl

A button in a form.

Author: Russell Gold

Field Summary
static HTMLElementPredicateWITH_ID
static HTMLElementPredicateWITH_LABEL
Method Summary
voidclick()
Performs the action associated with clicking this button after running any 'onClick' script.
protected voiddoButtonAction()
Perform the normal action of this button.
protected booleandoOnClickEvent()
Does the 'onClick' event defined for this button.
protected ScriptableDelegategetParentDelegate()
StringgetType()
StringgetValue()
Returns the value associated with this button.
booleanisDisabled()
Returns true if this button is disabled, meaning that it cannot be clicked.
protected ScriptableDelegatenewScriptable()
protected voidverifyButtonEnabled()

Field Detail

WITH_ID

public static final HTMLElementPredicate WITH_ID

WITH_LABEL

public static final HTMLElementPredicate WITH_LABEL

Method Detail

click

public void click()
Performs the action associated with clicking this button after running any 'onClick' script. For a submit button this typically submits the form.

doButtonAction

protected void doButtonAction()
Perform the normal action of this button.

doOnClickEvent

protected final boolean doOnClickEvent()
Does the 'onClick' event defined for this button.

Returns: true if subsequent actions should be performed.

getParentDelegate

protected ScriptableDelegate getParentDelegate()

getType

public String getType()

getValue

public String getValue()
Returns the value associated with this button.

isDisabled

public boolean isDisabled()
Returns true if this button is disabled, meaning that it cannot be clicked.

newScriptable

protected ScriptableDelegate newScriptable()

verifyButtonEnabled

protected void verifyButtonEnabled()