com.meterware.httpunit.scripting

Interface ScriptingEngineFactory

public interface ScriptingEngineFactory

Author: Russell Gold

Method Summary
voidassociate(WebResponse response)
Associates a scripting engine with the specified HTML web response.
voidclearErrorMessages()
Clears the accumulated script error messages.
String[]getErrorMessages()
Returns the accumulated script error messages encountered.
booleanisEnabled()
Returns true if this engine is enabled.
booleanisThrowExceptionsOnError()
Returns true if script errors cause exceptions to be thrown.
voidload(WebResponse response)
Runs the 'onload' event (if any) for the specified HTML web response.
voidsetThrowExceptionsOnError(boolean throwExceptions)
Determines whether script errors result in exceptions or warning messages.

Method Detail

associate

public void associate(WebResponse response)
Associates a scripting engine with the specified HTML web response.

clearErrorMessages

public void clearErrorMessages()
Clears the accumulated script error messages.

getErrorMessages

public String[] getErrorMessages()
Returns the accumulated script error messages encountered. Error messages are accumulated only if 'throwExceptionsOnError' is disabled.

isEnabled

public boolean isEnabled()
Returns true if this engine is enabled.

isThrowExceptionsOnError

public boolean isThrowExceptionsOnError()
Returns true if script errors cause exceptions to be thrown.

load

public void load(WebResponse response)
Runs the 'onload' event (if any) for the specified HTML web response. Will associate a scripting engine with the response if that has not already been done.

setThrowExceptionsOnError

public void setThrowExceptionsOnError(boolean throwExceptions)
Determines whether script errors result in exceptions or warning messages.