Overview of Classes

The class indicates the type, or kind, of GUI object being declared.

Note: 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 that 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 test case 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 as recorded cannot be changed

The one exception is that if the recorded class is CustomWin, meaning that Silk Test Classic does not recognize the object. You can, when appropriate, map the class to one that is recognized.

Custom classes

Enable an application to perform functions specific to the application and to enhance standard class functionality. Custom classes are also easy to maintain and can be extended easily by developers. All custom objects default to the built-in class, CustomWin.

Custom objects fall into two general categories:

Visible objects
Objects that Silk Test Classic knows about, but cannot identify, for example, the icon in an About dialog box. Two further categories of visible objects include:
  • Common objects are those that look and behave like standard objects, for example, a third-party object that looks and acts like a PushButton, but is recorded as a CustomWin.
  • Uncommon objects, on the other hand, have no relation to the existing standard objects. For example, an Icon. there is no corresponding Icon class.
Invisible objects
Objects that Silk Test Classic cannot recognize at all.