Custom Controls Options

Tools > Manage Custom Controls.

Silk Test Workbench supports managing custom controls over the UI for the following technology domains:
  • Win32
  • Windows Presentation Foundation (WPF)
  • Windows Forms
  • Java AWT/Swing
  • Java SWT

In the .NET Script for Custom Controls, define the script file into which the new custom classes should be generated.

The .NET script for custom controls is saved in the Common project. For all new databases, the default .NET script is called CustomControlScript. This script is automatically created for the user during the initial login to the database.
Note: The .NET script is required. If no script is selected in the .NET Script for Custom Controls field, the OK button is disabled. Select a script to enable the button. For existing databases, if you have write access to the Common project and if there is no .NET script for custom controls set, Silk Test Workbench tries to save a new script in the Common project. If a script with the name CustomControlScript already exists, and you have write access to the Common project, Silk Test Workbench tries to save the script with a number appended to the end of the script name, by sequentially trying the names CustomControlScript2, CustomControlScript3, and so on.
When you map a custom control class to a standard Silk Test class, you can use the functionality supported for the standard Silk Test class in your test. The following Custom Controls options are available:
Option
Description
Silk Test base class
Select an existing base class to use that your class will derive from. This class should be the closest match to your type of custom control.
Silk Test class
Enter the name to use to refer to the class. This is what will be seen in locators.
Custom control class name
Enter the fully qualified class name of the class that is being mapped. You can use the wildcards ? and * in the class name.
Use class declaration
This option is available only for Win32 applications. By default False, which means the name of the custom control class is mapped to the name of the standard Silk Test class. Set this setting to True to additionally use the class declaration of the custom control class.
Note: After you add a valid class, it will become available in the Silk Test base class list. You can then reuse it as a base class.

Example: Setting the options for the UltraGrid Infragistics control

To support the UltraGrid Infragistics control, use the following values:
Option Value
Silk Test base class Control
Silk Test class UltraGrid
Custom control class name Infragistics.Win.UltraWinGrid.UltraGrid