Testing a Custom Control Using Automation Support

You can create specific automation support for the custom control. This additional automation support provides recording support and more powerful play-back support. To create automation support, the test application must be modified and the Open Agent must be extended.

Before you can test a custom control in Silk Test Workbench, perform the following steps:
  • Define the custom control in the test application
  • Implement automation support

After the test application has been modified and includes automation support, perform the following steps:

  1. For visual tests, no additional configuration is needed. You can record and playback visual tests for the custom control as needed.
  2. For scripts, record the script and make manual modifications to fit the custom control. For example, the following code shows how to increment the spinner's value by 3 by using the "Increment" method that has been implemented in the automation delegate:
    _desktop.TestObject("//FlexSpinner[@caption='index:1']").Invoke("Increment", 3)
    The following example shows how to set the value of the spinner to 3.
    _desktop.TestObject("//FlexSpinner[@caption='index:1']").SetProperty("Value", 3)