Understanding the Recovery System
If your test case is based on an application state of none or a chain of application states ultimately based on none, all functions within the recovery system are not called. For example, SetAppState and SetBaseState are not called, while DefaultTestCaseEnter, DefaultTestCaseExit, and error handling are called.
Such a test case will be defined in the script file as:
Testcase Name() appstate none
SilkTest Classic records test cases based on DefaultBaseState as:
Testcase Name()
For application that use the Open Agent and dynamic object recognition, the recovery system is configured automatically whenever the New frame file dialog box opens and you save a file.
Understanding the Recovery System>Row of Control
The limit on the sCmdLine constant is 8191 characters.
Understanding the Recovery System>Modifying the Default Recovery System
The default recovery system is implemented in defaults.inc, which is located in the directory in which you installed SilkTest Classic.
Understanding the Recovery System>Modifying the Default Recovery System>Handling>Handling Login Window
Handling Browser Pop-up Windows in Tests that Use the Classic Agent
Browser pop-up windows are recognized as instances of Browser.
When the popup window is active, it is seen as Browser and the original browser is seen as Browser2. In order to make DefaultBaseState() close the pop-up window instead of the original browser, add the following line to the end of the test case:
Browser2.SetActive()
Specifying Windows to be Left Open for Tests that Use the Classic Agent
To specify which windows, if any, need to be left open, such as a child window that is always open, use the lwLeaveOpen constant.
e.g. Set the lwLeaveOpen constant so that the recovery system leaves open the window with the 4Test identifier DocumentWindow when it restores the base state.
const lwLeaveOpen={DocumentWindow}
Note: Separate each identifier with a comma.
Specifying Windows to be Left Open for Tests that Use the Open Agent
Using the lwLeaveOpenWindows or lsLeaveOpenLocators constant.
e.g. Set the lwLeaveOpenWindows constant so that the recovery system leaves open the window with the 4Test identifier DocumentWindow when it restores the base state.
const lwLeaveOpenWindows={DocumentWindow}
e.g. Set the lsLeaveOpenLocators constant so that the recovery system leaves open the About dialog box when it restores the BaseState.
lsLeaveOpenLocators = {“/MainWin[@caption=’*Information*’]”, “//Dialog[@caption=’About’]”}
About the derived keyword and scope resolution operator
The statement derived::Invoke() uses the derived keyword followed by the scope resolution operator (::) to call the built-in Invoke method.