com.mercury.ftjadin.utils
Class Config
java.lang.Objectcom.mercury.ftjadin.utils.Config
- extends java.lang.Object
public final class Config
The Config class contains Java test variables values
that can be set in a UFT GUI test. Variables are set with
a call to Setting.Java("name") = "value"
NOTE: Configuration variables are not case sensitive.
| Field Summary | |
|---|---|
static boolean | isBlockerDebugIndicates whether either isDebug or |
static boolean | isBlockerStackDebugIndicates whether blocker_stack section debugging is active. |
static boolean | isDescToObjectDebugIndicates whether desc_to_object section debugging is active. |
static boolean | isEnumDebugIndicates whether either enum section or enum_detailed section debugging is active. |
static boolean | isEnumDetailedDebugIndicates whether enum_detailed section debugging is active. |
static boolean | isFocusDebugIndicates whether focus section debugging is active. |
static boolean | isHierarchyDebugIndicates whether hierarchy section debugging is active. |
static boolean | isIdCacheDebugIndicates whether id_cache section debugging is active. |
static boolean | isIdenticalsDebugIndicates whether identicals section debugging is active. |
static boolean | isJcoDebugIndicates whether jco section debugging is active. |
static boolean | isLoadDebugIndicates whether load section debugging is active. |
static boolean | isRecordDebugIndicates whether either record section or record_stack section debugging is active. |
static boolean | isRecordStackDebugIndicates whether record_stack section debugging is active. |
static boolean | isReplayDebugIndicates whether replay section debugging is active. |
static boolean | isReplayEventsDebugIndicates whether replay_events section debugging is active. |
static boolean | isSpyDebugIndicates whether spy section debugging is active. |
static boolean | isWindowsDebugIndicates whether windows section debugging is active. |
| Constructor Summary | |
|---|---|
Config() | |
| Method Summary | |
|---|---|
static java.lang.String | getVariable(java.lang.String name)Gets the configuration variable defined by a Setting.Java("name") = "value" statement. |
static java.lang.String | getVariable(java.lang.String name,
java.lang.String defaultValue)Gets the configuration variable defined by a Setting.Java("name") = "value" statement. |
static boolean | getVariableAsBoolean(java.lang.String str)Gets the configuration variable defined by a Setting.Java("name") = "value" statement. |
static int | getVariableAsInt(java.lang.String str)Gets the configuration variable defined by a Setting.Java("name") = "value" statement. |
static boolean | isDebug(java.lang.String section)Checks whether the specified debug section is enabled. |
static void | setConfigVar(java.lang.String varName,
java.lang.String value)Stores configuration variables without using record attributes. |
static void | setVariableCallback(java.lang.String varName,
VariableCallback clb)Installs the VariableCallback object for the specified configuration variable. |
| Field Detail |
|---|
isRecordDebug
public static boolean isRecordDebug
- Indicates whether either
recordsection orrecord_stacksection debugging is active.
isRecordStackDebug
public static boolean isRecordStackDebug
- Indicates whether
record_stacksection debugging is active.
isReplayDebug
public static boolean isReplayDebug
- Indicates whether
replaysection debugging is active.
isReplayEventsDebug
public static boolean isReplayEventsDebug
- Indicates whether
replay_eventssection debugging is active.
isEnumDebug
public static boolean isEnumDebug
- Indicates whether either
enumsection orenum_detailedsection debugging is active.
isEnumDetailedDebug
public static boolean isEnumDetailedDebug
- Indicates whether
enum_detailedsection debugging is active.
isJcoDebug
public static boolean isJcoDebug
- Indicates whether
jcosection debugging is active.
isLoadDebug
public static boolean isLoadDebug
- Indicates whether
loadsection debugging is active.
isHierarchyDebug
public static boolean isHierarchyDebug
- Indicates whether
hierarchysection debugging is active.
isIdenticalsDebug
public static boolean isIdenticalsDebug
- Indicates whether
identicalssection debugging is active.
isWindowsDebug
public static boolean isWindowsDebug
- Indicates whether
windowssection debugging is active.
isBlockerDebug
public static boolean isBlockerDebug
- Indicates whether either
isDebug orblocker_stacksection debugging is active.
isBlockerStackDebug
public static boolean isBlockerStackDebug
- Indicates whether
blocker_stacksection debugging is active.
isDescToObjectDebug
public static boolean isDescToObjectDebug
- Indicates whether
desc_to_objectsection debugging is active.
isFocusDebug
public static boolean isFocusDebug
- Indicates whether
focussection debugging is active.
isIdCacheDebug
public static boolean isIdCacheDebug
- Indicates whether
id_cachesection debugging is active.
isSpyDebug
public static boolean isSpyDebug
- Indicates whether
spysection debugging is active.
| Constructor Detail |
|---|
Config
public Config()
| Method Detail |
|---|
setConfigVar
public static void setConfigVar(java.lang.String varName, java.lang.String value)
- Stores configuration variables without using record attributes.
- Parameters:
varName- The name of the variable to set.value- The new value.
getVariable
public static java.lang.String getVariable(java.lang.String name)
- Gets the configuration variable defined by a Setting.Java("name") = "value" statement.
- Parameters:
name- The name of the variable whose value is to be retrieved.- Returns:
- The variable's value as a string.
- See Also:
getVariableAsInt(java.lang.String)
getVariable
public static java.lang.String getVariable(java.lang.String name, java.lang.String defaultValue)
- Gets the configuration variable defined by a Setting.Java("name") = "value" statement. If not defined, returns the specified default.
- Parameters:
name- The name of the variable whose value is to be retrieved.defaultValue- The value to be returned if the variable is not defined.- Returns:
- The variable's value as a string.
- See Also:
getVariableAsInt(java.lang.String)
getVariableAsInt
public static int getVariableAsInt(java.lang.String str)
- Gets the configuration variable defined by a Setting.Java("name") = "value" statement. If the variable is not defined or cannot be expressed as an integer, returns 0.
- Parameters:
str- The name of the variable whose value is to be retrieved.- Returns:
- The variable's value as an integer.
- See Also:
getVariable(java.lang.String)
getVariableAsBoolean
public static boolean getVariableAsBoolean(java.lang.String str)
- Gets the configuration variable defined by a Setting.Java("name") = "value" statement. If the variable value is 'on' or a non-zero integer, getVariableAsBoolean returns True. If the value is 'off'; zero; neither 'on', 'off' nor an integer; or is undefined, it returns False. 'On' and 'off' are not case sensitive.
- Parameters:
str- The name of the variable whose value is to be retrieved.- Returns:
- The variable's value as a boolean.
- See Also:
getVariable(java.lang.String)
setVariableCallback
public static void setVariableCallback(java.lang.String varName,
VariableCallback clb)- Installs the
VariableCallbackobject for the specified configuration variable. Any change of the specified variable triggers invocation of thevalueChangedmethod of the VariableCallback object. - Parameters:
varName- The name of the variable.clb- The callback to be installed.
isDebug
public static boolean isDebug(java.lang.String section)
- Checks whether the specified debug section is enabled.
Sections are enabled by calling
Setting.Java("sections_to_debug")="section1 section2 ...". - Parameters:
section- The section to check.- Returns:
- True if the section is enabled.

com.mercury.ftjadin.utils.Config
