background image
<< Pause tracking | Complete the declaration for the wStartup constant >>

Windows that Precede the Main Window

<< Pause tracking | Complete the declaration for the wStartup constant >>
Getting Started: A Tutorial
81
4 C
APTURING
Y
OUR
A
PPLICATION
Windows that Precede the Main Window
Windows that Precede the Main Window
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. If you do not tell SilkTest how to handle this "first window" it will
not be able to meet DefaultBaseState, and therefore it will not be able to run
any testcases. You can handle such a window by deriving, from the Invoke
method used by DefaultBaseState, a new Invoke method. There are three
steps to defining a derived Invoke method:
·
Step 1: Record a declaration for the first window and include it in your
test frame.
·
Step 2: Complete the declaration for the wStartup constant.
·
Step 3: Define an Invoke method in the main window declaration that
calls the built-in Invoke method and performs any actions required by the
"first window".
Important The following exercise is for the client/server sample
application only.
If you are completing the tutorial for the GMO Web application, please
proceed to
"Testing DefaultBaseState" on page 85
. If you are completing the
tutorial for the GMO client/server application, please continue on to
"Handling windows that precede the main window".
Handling windows
that precede the main
window
The following exercise shows you how to create a derived Invoke method for
the GMO client/server application. This derived Invoke method tells SilkTest
how to handle the dialog box that appears before the main window.
Step 1: Create the declaration
1
Close the GMO client/server application if it is running
2
Activate the dialog that precedes the application's main window
Open the GMO application. From the Start menu choose Programs/
Green Mountain Outpost/GMO
.
The Green Mountain Outpost dialog appears. Do not close it.