Slowing Down Tests

This functionality is supported only if you are using the Open Agent.

Some applications under test might require extensive loading of application data in the UI, and might not be finished on time with loading objects that are required for replaying a test. To successfully replay tests on such an AUT, you can check for the existence of an object before performing an action on it, or you can add sleeps before performing an action.

Note: Micro Focus does not recommend generally adding sleeps to tests, because in most cases Silk Test Classic will automatically detect if an object is available, and sleeps might severely reduce the performance of tests.
  1. To check if an object is available in the AUT, use the Exists method. For example, to wait for six seconds for the button INPUT to become available, add the following line to your test script:
    WebBrowser.BrowserWindow.Input.Exists(6)
  2. To add a sleep before performing an action on a control, use the method. For example, to sleep for six seconds, add the following line to your test script:
    Sleep(6)