Class AbstractHtmlUnitScriptModule
- java.lang.Object
-
- com.xceptance.xlt.api.engine.scripting.AbstractHtmlUnitScriptModule
-
- Direct Known Subclasses:
AbstractHtmlUnitActionsModule
,AbstractHtmlUnitCommandsModule
public abstract class AbstractHtmlUnitScriptModule extends java.lang.Object
Base class of command modules.
-
-
Constructor Summary
Constructors Constructor Description AbstractHtmlUnitScriptModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
evaluatesToTrue(java.lang.String jsExpression)
Returns whether or not the given expression evaluates totrue
.protected java.lang.String
resolve(java.lang.String resolvable)
Resolves the given string.protected java.lang.String
resolveKey(java.lang.String key)
Resolves the given test data key.
-
-
-
Method Detail
-
resolve
protected java.lang.String resolve(java.lang.String resolvable)
Resolves the given string.- Parameters:
resolvable
- the string to be resolved- Returns:
- the resolved string
-
resolveKey
protected java.lang.String resolveKey(java.lang.String key)
Resolves the given test data key.- Parameters:
key
- the key string containing only the name of a test data field- Returns:
- resolved string or
null
if not found
-
evaluatesToTrue
protected boolean evaluatesToTrue(java.lang.String jsExpression)
Returns whether or not the given expression evaluates totrue
.- Parameters:
jsExpression
- the JavaScript expression to evaluate- Returns:
true
if and only if the given JavaScript expression is not blank and evaluates totrue
-
-