Manual Scripting

While recording provides a quick and effective way to create scripts, there are often tweaks and enhancements needed to make scripts reusable, more reliable, and more effective. You can manually add code to any script to accomplish this. Since Silk Test Workbench uses VB.NET as its scripting language, some knowledge of VB.NET is needed. Silk Test Workbench extends the VB.NET scripting language to provide robust and powerful scripting capabilities. See the Silk Test Workbench Language Reference for information on classes, methods and properties and how to use each in scripts.

Silk Test Workbench also provides other features and leverages VB.NET scripting features to make manual scripting easier. These features include:
  • Identify Objects dialog box – The Identify Objects dialog box enables you to view how locators are recorded and which properties are available for those objects.

  • Auto-completion and Syntactical Assistance – These facilitate manual coding. Using auto-completion and syntactical assistance, you can automatically access, display, and automatically enter VB.NET language elements, including keywords, enumerations, Boolean values, code syntax, available methods, and available VB.NET properties for any object.

Note: When you are manually creating a new test script, you have to add statements to your script to import the extensions for the classes that you use. For example, for Win32 methods, you have to insert the following line to the start of your script:
Imports SilkTest.Ntf.Win32
When you record a click on an accessible control, the import statements are automatically inserted into the script. Common Silk Test classes, for example BaseGuiTestObject, do not need to be imported because they are always available.