background image
<< Test Frame - About GUI specifiers | Test Frame - About dialog declarations >>
Test Frame - The sCmdLine constant specifies
<< Test Frame - About GUI specifiers | Test Frame - About dialog declarations >>
User's Guide
91
4 R
ECORDING
A
T
EST
F
RAME
Window declaration syntax and structure
The sCmdLine and
wMainWindow
constants
When you record the declaration for your application's main window and
menus, the sCmdLine and wMainWindow constants are created. These
constants allow your application to be started automatically when you run
your testcases.
The sCmdLine constant specifies the path to your application's executable.
The following example shows sCmdLine constants for different operating
environments:
msw const sCmdLine =
"d:\mytests\texted2.exe"
motif const sCmdLine = "textedit"
mac const sCmdLine = "Centris610:Sample:Text Editor"
The wMainWindow constant specifies the 4Test identifier for the main
window of your application. For example, here is the definition for the
wMainWindow constant of the Text Editor application on all platforms:
const wMainWindow = TextEditor
The menu
declarations
The following example from the Text Editor application shows the default
main window declaration and a portion of the declarations for the File menu:
window MainWin TextEditor
multitag "Text Editor"
"$D:\MYTESTS\TEXTED2.EXE"
.
.
.
Menu File
tag "File"
MenuItem New
multitag "New"
"$100"
Note Menus do not have window IDs, but menu items do, so by
default menus are declared with the tag statement while menu items
are declared with the multitag statement. For more information, see
"About tags" on page 85.
Declarations are
nested
The declarations for the menus are nested (indented) within the declaration
for the main window, and the declarations for the menu items are nested
within their respective menus. This nesting denotes the hierarchical structure
of the GUI, that is, the parent-child relationships between GUI objects.
In the sample Text Editor application, MainWin is the parent of the File
menu; the File menu is considered a child of the MainWin. Similarly, all the
menu items are child objects of their parent, the File menu. A child object
belongs to its parent object, which means that it is either logically associated
with the parent or physically contained by the parent.