Package com.meterware.httpunit
Class FormControl.Scriptable
java.lang.Object
com.meterware.httpunit.scripting.ScriptableDelegate
com.meterware.httpunit.FormControl.Scriptable
- All Implemented Interfaces:
DocumentElement,IdentifiedDelegate,Input,NamedDelegate,ScriptingEventHandler,ScriptingHandler
- Enclosing class:
FormControl
implementation of Scriptable input elements
-
Field Summary
Fields inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
NULL_SCRIPT_ENGINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblur()simulate blurvoidclick()allow calling click for this controlvoidfocus()simulate focus;get the given propertyprotected HTMLElementgetAttribute(String attributeName) get the content of the given attributegetID()get my IDgetName()get my NamebooleanhandleEvent(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 attributevoidallow firing a sendOnChangeEventvoidset the given property to the given valuevoidsetAttribute(String attributeName, Object value) set the given attribute to the given valueMethods inherited from class com.meterware.httpunit.scripting.ScriptableDelegate
clearCaches, doEvent, doEventScript, evaluateExpression, get, getDelegates, getScriptEngine, getScriptEngine, runScript, setScriptEngine, supportsScriptLanguageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.meterware.httpunit.scripting.Input
removeAttribute
-
Constructor Details
-
Scriptable
public Scriptable()construct a Scriptable
-
-
Method Details
-
getName
get my Name- Specified by:
getNamein interfaceNamedDelegate- Returns:
- the name of this scriptable
-
getID
get my ID- Specified by:
getIDin interfaceIdentifiedDelegate- Returns:
- the id of this scriptable
-
get
get the given property -
set
set the given property to the given value- Specified by:
setin interfaceInput- Overrides:
setin classScriptableDelegate- Parameters:
propertyName- - the property to setvalue- - the value to use
-
setAttribute
set the given attribute to the given value- Specified by:
setAttributein interfaceInput- Parameters:
attributeName- - the name of the attribute to setvalue- - the value to use
-
click
allow calling click for this control- Specified by:
clickin interfaceInput- Throws:
IOExceptionSAXException
-
blur
public void blur()simulate blur -
focus
public void focus()simulate focus; -
sendOnChangeEvent
public void sendOnChangeEvent()allow firing a sendOnChangeEvent- Specified by:
sendOnChangeEventin interfaceInput
-
get_element
- Returns:
- the _element
-
getAttribute
get the content of the given attribute- Parameters:
attributeName-- Returns:
- the attribute as a string
-
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
-