Package com.meterware.httpunit
Class WebForm.Scriptable
java.lang.Object
com.meterware.httpunit.scripting.ScriptableDelegate
com.meterware.httpunit.WebForm.Scriptable
- All Implemented Interfaces:
DocumentElement
,FormScriptable
,NamedDelegate
,ScriptingEventHandler
,ScriptingHandler
- Enclosing class:
- WebForm
-
Field Summary
Fields inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
NULL_SCRIPT_ENGINE
-
Method Summary
Modifier and TypeMethodDescriptionget the Object for the given propertyNameprotected HTMLElement
getAttribute
(String attributeName) get the content of the given attributegetElementsByTagName
(String name) getName()
boolean
handleEvent
(String eventName) Executes the event Handler script for the specified event (such as onchange, onmousedown, onclick, onmouseup) if it is defined.void
removeAttribute
(String attributeName) remove the given attributevoid
reset()
void
Sets the value of the named property.void
set the actionvoid
setAttribute
(String attributeName, Object value) set the attribute with the given attribute name to the given valuevoid
setParameterValue
(String name, String value) set the value of a parametervoid
submit()
Methods inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
clearCaches, doEvent, doEventScript, evaluateExpression, get, getDelegates, getScriptEngine, getScriptEngine, runScript, setScriptEngine, supportsScriptLanguage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.meterware.httpunit.scripting.ScriptingEventHandler
doEvent, doEventScript, handleEvent
-
Method Details
-
getAction
-
setAction
Description copied from interface:FormScriptable
set the action- Specified by:
setAction
in interfaceFormScriptable
-
submit
- Throws:
IOException
SAXException
-
reset
- Throws:
IOException
SAXException
-
getName
- Specified by:
getName
in interfaceNamedDelegate
-
get
get the Object for the given propertyName- Parameters:
propertyName
- - the name of the property to get- Returns:
- the Object for the property
-
set
Sets the value of the named property. Will throw a runtime exception if the property does not exist or cannot accept the specified value.- Overrides:
set
in classScriptableDelegate
- Parameters:
propertyName
- - the name of the propertyvalue
- - the new value
-
setParameterValue
Description copied from interface:FormScriptable
set the value of a parameter- Specified by:
setParameterValue
in interfaceFormScriptable
- Parameters:
name
- - the name of the parameter to setvalue
- - the value to use for the parameter
-
getElementDelegates
-
getElementsByTagName
- Throws:
SAXException
-
get_element
- Returns:
- the _element
-
getAttribute
get the content of the given attribute- Parameters:
attributeName
-- Returns:
- the attribute as a string
-
setAttribute
set the attribute with the given attribute name to the given value- Parameters:
attributeName
-value
-
-
removeAttribute
remove the given attribute- Parameters:
attributeName
-
-
handleEvent
Description copied from class:ScriptableDelegate
Executes the event Handler script for the specified event (such as onchange, onmousedown, onclick, onmouseup) if it is defined.- Specified by:
handleEvent
in interfaceScriptingEventHandler
- Overrides:
handleEvent
in classScriptableDelegate
- Parameters:
eventName
- the name of the event for which a handler should be run.- Returns:
- whether the event with the given name was handled
-