background image
<< Recovery System - Specifying windows to be left open | Recovery System - Adding to the default base state >>
Recovery System - Handling login windows
<< Recovery System - Specifying windows to be left open | Recovery System - Adding to the default base state >>
User's Guide
297
15 U
NDERSTANDING
THE
R
ECOVERY
S
YSTEM
Handling login windows
2
Remove the comment characters (the two forward slash characters) at the
beginning of the declaration.
For example, the following 4Test code shows how to 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}
Handling login windows
Although an application's main window is usually displayed first, it is also
common for a login or security window to be displayed before the main
window.
Use the wStartup
constant and the
Invoke method
To account for login windows, you need to record a declaration for the login
window, set the value of the wStartup constant, and write a new Invoke
method for the main window that enters the appropriate information into the
login window and dismisses it. This enables the DefaultBaseState routine to
perform the actions necessary to get past the Login window.
Note You do not need to use the procedure outlined in this section
for splash screens that disappear on their own.
Procedure To account for login windows:
1
Activate the Login window and record a declaration for it using the
Record/Declarations command. Paste the resulting declaration to the test
frame file. Refer to "About dialog declarations" on page 92 for more
information on using the Record/Declarations command.
2
In your test frame file, find the stub of the declaration for the wStartup
constant, located at the top of the declaration for the main window:
// First window to appear when application is invoked
// const wStartup = ?
3
Complete the declaration for the wStartup constant by
a
Removing the comment characters (the two forward slash
characters) at the beginning of the declaration.
b
Replacing the question mark with the identifier of the login window,
as recorded in the window declaration for the login window.
4
Define an Invoke method in the main window declaration that calls the
built-in Invoke method and additionally performs any actions required by
the login window, such as entering a name and password.