Package com.meterware.httpunit
Class WebLink.Scriptable
java.lang.Object
com.meterware.httpunit.scripting.ScriptableDelegate
com.meterware.httpunit.WebLink.Scriptable
- All Implemented Interfaces:
DocumentElement,NamedDelegate,ScriptingEventHandler,ScriptingHandler
- Enclosing class:
WebLink
-
Field Summary
Fields inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
NULL_SCRIPT_ENGINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget the property with the given nameprotected HTMLElementgetAttribute(String attributeName) get the content of the given attributegetName()booleanhandleEvent(String eventName) Executes the event Handler script for the specified event (such as onchange, onmousedown, onclick, onmouseup) if it is defined.voidremoveAttribute(String attributeName) remove the given attributevoidSets the value of the named property.voidsetAttribute(String attributeName, Object value) set the attribute with the given attribute name to the given valueMethods inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
clearCaches, doEvent, doEventScript, evaluateExpression, get, getDelegates, getScriptEngine, getScriptEngine, runScript, setScriptEngine, supportsScriptLanguage
-
Constructor Details
-
Scriptable
public Scriptable()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNamedDelegate
-
get
get the property with the given name- Parameters:
propertyName- - the name of the property to get
-
set
Description copied from class:ScriptableDelegateSets the value of the named property. Will throw a runtime exception if the property does not exist or cannot accept the specified value.- Overrides:
setin classScriptableDelegate
-
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:ScriptableDelegateExecutes the event Handler script for the specified event (such as onchange, onmousedown, onclick, onmouseup) if it is defined.- Specified by:
handleEventin interfaceScriptingEventHandler- Overrides:
handleEventin 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
-