background image
<< Test Frame - Window declaration syntax and structure | Test Frame - About tags >>
Test Frame - About classes
<< Test Frame - Window declaration syntax and structure | Test Frame - About tags >>
84
User's Guide
4 R
ECORDING
A
T
EST
F
RAME
Window declaration syntax and structure
The window declaration maps the object's logical, platform-independent
name, called the identifier, to the object's actual name, called the tag.
About classes
The class indicates the type, or kind, of GUI object being declared.
Classes are cross
platform
Note that this is the 4Test class, not the class that the GUI itself uses
internally. For example, although the class might be Label on one GUI and
Text on another, 4Test uses the class name StaticText to refer to text strings
which cannot be edited.
A class defines data
and behavior
The class also defines methods (actions) and properties (data) that are
inherited by the GUI object. For example, if you record a declaration for a
pushbutton named OK, a testcase can legally use a method like Click on the
pushbutton because the Click method is defined at the class level. In other
words, the definition of what it means to click on a pushbutton is included
within the definition of the 4Test class itself, and this definition is inherited
by each pushbutton in the GUI. If this were not true, you would have to
define within each GUI object's window declaration all the methods you
wanted to use on that object.
The class cannot be
changed
The class as recorded cannot be changed. The one exception is that if the
recorded class is CustomWin--meaning that SilkTest does not recognize the
object--you can, when appropriate, map the class to one that is recognized,
as described in "Mapping custom classes to standard classes" on page 95.
Related topics
For more information on using object-oriented classes, see Chapter 16,
"Extending the Class Hierarchy".
Identifier
Tag
Class