Starting an External Application Within a Visual Test

Visual tests can start external applications during playback. This enables you to test the startup of test applications to ensure they start as expected, while also ensuring the state of a test site when testing against applications when they are started.

  1. Open the visual test in which you want to start the external application.
  2. Select the step that precedes where you want the application to start.
  3. Choose Insert > External Program. Silk Test Workbench inserts a Run program step below the selected step.
  4. Select the newly created Run program step to display its properties in the Properties pane. The Command category properties display in the Properties pane.
  5. In the Path Name text box, perform one of the following steps:
    • Type the path to the external program that you want to start.
    • Click Select file to open the Select file dialog box and navigate to the external program that you want to start.
    • Click Select and specify a literal value, variable, expression, or ActiveData to use to start the external program.
    Note: If the operation to perform is Find or Explore, only the a path name is required for this property.
  6. From the Operation list box, select the action to perform when the application starts. You can choose one of the following:
    • Open (default) – Opens the specified file using any named parameters. The file can be an application, a document file, or a folder.
    • Edit – Starts an editor and opens the file for editing. If the file specified by the Path Name property is not a document file that can be opened in a document editor, the operation does not execute.
    • Explore – Uses Windows Explorer to open the folder specified by the Path Name property.
    • Find – Starts Windows Explorer in search mode starting from the specified directory. The directory can be specified using either the Path Name property or the Directory property. If using thePath Name property and including a file name, playing back the test does not execute the step.
    • Print – Prints a document file specified by the Path Name property. If the file specified by the Path Name property is not a document file, playing back the test does not execute the step.
  7. In the Parameters text box, specify any parameters to pass to the application for startup. If the file specified by the Path Name property is an application file, use this property to specify a null-terminated string containing parameters passed to the application and used for startup. If the file specified by the Path Name property is a document or other type of file, leave the value blank.
  8. In the Directory text box, specify a default directory that can be used for the action specified by the Operation property.
  9. From the Window style list box, select how the application or program displays when it starts. Values include:
    • Hide – Window is hidden when program or application starts and focus is passed to another window.
    • Maximize – Maximizes the application window.
    • Minimize – Minimizes the application window at startup and activates the next top-level window in the z-order.
    • Restore – Starts and displays the application window. If the window is minimized or maximized, then it is restored to its original size and position. Use this value when restoring a minimized window.
    • Show – Starts the application window and displays it in its current size and position.
    • Show default – Sets the window display state based on the information provided by the program that starts the application.
    • Show maximized – Starts the application and displays it in a maximized window.
    • Show minimized – Starts the application and displays it in a minimized window.
    • Show minimized, do not activate – Displays the application as a minimized window. The current active window remains active.
    • Show in current state, do not activate – Displays the application in its current window state. The active window remains active.
    • Show in most recent position, do not activate – Displays the application in its most recent window size and position. The active window remains active.
    • Show normal – Starts the application and displays a window. If the window's most recent position minimized or maximized, the window is restored to its original size and position. Use this value when displaying the window for the first time.