com.mercury.ftjadin.utils
Class Config

java.lang.Object
  extended bycom.mercury.ftjadin.utils.Config

public final class Config
extends java.lang.Object

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 booleanisBlockerDebug
          Indicates whether either isDebug or blocker_stack section debugging is active.
static booleanisBlockerStackDebug
          Indicates whether blocker_stack section debugging is active.
static booleanisDescToObjectDebug
          Indicates whether desc_to_object section debugging is active.
static booleanisEnumDebug
          Indicates whether either enum section or enum_detailed section debugging is active.
static booleanisEnumDetailedDebug
          Indicates whether enum_detailed section debugging is active.
static booleanisFocusDebug
          Indicates whether focus section debugging is active.
static booleanisHierarchyDebug
          Indicates whether hierarchy section debugging is active.
static booleanisIdCacheDebug
          Indicates whether id_cache section debugging is active.
static booleanisIdenticalsDebug
          Indicates whether identicals section debugging is active.
static booleanisJcoDebug
          Indicates whether jco section debugging is active.
static booleanisLoadDebug
          Indicates whether load section debugging is active.
static booleanisRecordDebug
          Indicates whether either record section or record_stack section debugging is active.
static booleanisRecordStackDebug
          Indicates whether record_stack section debugging is active.
static booleanisReplayDebug
          Indicates whether replay section debugging is active.
static booleanisReplayEventsDebug
          Indicates whether replay_events section debugging is active.
static booleanisSpyDebug
          Indicates whether spy section debugging is active.
static booleanisWindowsDebug
          Indicates whether windows section debugging is active.
 
Constructor Summary
Config()
           
 
Method Summary
static java.lang.StringgetVariable(java.lang.String name)
          Gets the configuration variable defined by a Setting.Java("name") = "value" statement.
static java.lang.StringgetVariable(java.lang.String name, java.lang.String defaultValue)
          Gets the configuration variable defined by a Setting.Java("name") = "value" statement.
static booleangetVariableAsBoolean(java.lang.String str)
          Gets the configuration variable defined by a Setting.Java("name") = "value" statement.
static intgetVariableAsInt(java.lang.String str)
          Gets the configuration variable defined by a Setting.Java("name") = "value" statement.
static booleanisDebug(java.lang.String section)
          Checks whether the specified debug section is enabled.
static voidsetConfigVar(java.lang.String varName, java.lang.String value)
          Stores configuration variables without using record attributes.
static voidsetVariableCallback(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 record section or record_stack section debugging is active.


isRecordStackDebug

public static boolean isRecordStackDebug
Indicates whether record_stack section debugging is active.


isReplayDebug

public static boolean isReplayDebug
Indicates whether replay section debugging is active.


isReplayEventsDebug

public static boolean isReplayEventsDebug
Indicates whether replay_events section debugging is active.


isEnumDebug

public static boolean isEnumDebug
Indicates whether either enum section or enum_detailed section debugging is active.


isEnumDetailedDebug

public static boolean isEnumDetailedDebug
Indicates whether enum_detailed section debugging is active.


isJcoDebug

public static boolean isJcoDebug
Indicates whether jco section debugging is active.


isLoadDebug

public static boolean isLoadDebug
Indicates whether load section debugging is active.


isHierarchyDebug

public static boolean isHierarchyDebug
Indicates whether hierarchy section debugging is active.


isIdenticalsDebug

public static boolean isIdenticalsDebug
Indicates whether identicals section debugging is active.


isWindowsDebug

public static boolean isWindowsDebug
Indicates whether windows section debugging is active.


isBlockerDebug

public static boolean isBlockerDebug
Indicates whether either isDebug or blocker_stack section debugging is active.


isBlockerStackDebug

public static boolean isBlockerStackDebug
Indicates whether blocker_stack section debugging is active.


isDescToObjectDebug

public static boolean isDescToObjectDebug
Indicates whether desc_to_object section debugging is active.


isFocusDebug

public static boolean isFocusDebug
Indicates whether focus section debugging is active.


isIdCacheDebug

public static boolean isIdCacheDebug
Indicates whether id_cache section debugging is active.


isSpyDebug

public static boolean isSpyDebug
Indicates whether spy section 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 VariableCallback object for the specified configuration variable. Any change of the specified variable triggers invocation of the valueChanged method 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.