Does SilkTest support Sheridan controls?
Sheridan controls are widely used within the VB programming environment which has its own classes built on the basic VB classes. This means that you may have to do some customization to your 4Test code if you find that SilkTest methods don"t playback the way you expect them to or if you have trouble recording.
Try any of the following:
1. Recording new classes for ActiveX/Visual Basic controls
The process of recording a class involves querying the objects in your application, retrieving information on properties and methods, and then translating the information into 4Test-style prototypes. SilkTest does this automatically for you when you select Record/Class. We recommend that you create an include file (for example, userclass.inc) for your new class definitions, instead of entering them in vbclass.inc. This way you will not have to update vbclass.inc each
time you record new class definitions.
To record new classes:
a. Start your application. If you are recording classes for controls on a Web page, navigate to that Web page.
b. Open the include file you created for your new class definitions. For information on how to load class definition files, see Several ways to load class definition files.
c. Select Record/Class to open the Record Class dialog.
d. Position the mouse pointer over the control for which you want to record a class.
e. When the correct name appears in the Window field, press Ctrl+Alt. Properties and methods for that class are displayed in the Record Class dialog.
WARNING: Do not edit the tag name in the Tag field.
f. Click on the Derived From drop-down menu to see the list of available 4Test classes.
g. If there is a class type available that maps directly to your object, choose it. For example, if your object is a SuperListBox, you would likely choose ListBox (note that similarly named objects might not behave as expected). Your object will inherit all the standard 4Test methods and properties defined for a list box.
h. If there is not a class type that maps directly to your object, choose Control, which is a generic class.
NOTE The Agent provides special handling for certain classes of objects. If your object is one of these types, but does not work correctly while you are testing your application, you will also need to class map the object after completing this procedure. For more information, see the chapter on supporting custom objects in the User"s Guide.
i. Click Paste to Editor to paste the new class into the include file.
j. Repeat this process for every type of control in your application that does not appear in the list of classes provided. When you are done recording classes, click the Close pushbutton.
2. Recording Graphical Controls
Recording classes is one possibility. However, as is more common with graphical controls especially toolbars that they are made up of a number of different graphical controls which complicates things even further because SilkTest will record a single declaration for the entire area and will not recognise individual controls.
In the SilkTest User Guide there is an entire section dealing with the support of custom objects and within this section there is a subsection that deals with supporting graphical controls. This section was written to explain exactly how to handle and manipulate controls like Sheridan Toolbars.
The best way of manipulating such controls is by using relative coordinates this divides the screen up into a grid if as few or as many squares as you need and then you can use the mouse click event to click in the particular square that the control is in.
These are explained in detail in the "Supporting Graphical Controls" section of the SilkTest User"s Guide.
NOTE: Sheridan controls are not standard controls and these techniques may take a certain amount of trial and error and manipulation in order for you to get the desired results.