java.lang.Object
com.meterware.httpunit.scripting.ScriptableDelegate
- public abstract class ScriptableDelegate
- extends java.lang.Object
An interface for objects which will be accessible via scripting.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_scriptEngine
private ScriptingEngine _scriptEngine
NULL_SCRIPT_ENGINE
private static final ScriptingEngine NULL_SCRIPT_ENGINE
ScriptableDelegate
public ScriptableDelegate()
supportsScript
public boolean supportsScript(java.lang.String language)
doEvent
public boolean doEvent(java.lang.String eventScript)
- Executes the specified scripted event.
runScript
public java.lang.String runScript(java.lang.String language,
java.lang.String script)
- Executes the specified script, returning any intended replacement text.
evaluateExpression
public java.lang.String evaluateExpression(java.lang.String urlString)
- Evaluates the specified javascript expression, returning its value.
get
public java.lang.Object get(java.lang.String propertyName)
- Returns the value of the named property. Will return null if the property does not exist.
get
public java.lang.Object get(int index)
- Returns the value of the index property. Will return null if the property does not exist.
set
public void set(java.lang.String propertyName,
java.lang.Object value)
- Sets the value of the named property. Will throw a runtime exception if the property does not exist or
cannot accept the specified value.
setScriptEngine
public void setScriptEngine(ScriptingEngine scriptEngine)
- Specifies the scripting engine to be used.
getScriptEngine
public ScriptingEngine getScriptEngine()
getScriptEngine
public ScriptingEngine getScriptEngine(ScriptableDelegate child)
getDelegates
protected ScriptableDelegate[] getDelegates(com.meterware.httpunit.HTMLElement[] elements)