Managing processes (SystemUtil)

The SystemUtil object is a wrapper that provides a few methods to launch and terminate processes, and to block and unblock user input. In the following sections, we will describe these methods and explain how they work.

Getting ready

From the File menu, navigate to New | Test, or use the Ctrl + N shortcut.

How to do it…

Proceed with the following steps:

  1. Run: It invokes an application with parameters. There is an option to define the work directory, operation, and mode at the opening (maximized and so on). The syntax is as follows:
    SystemUtil.Run file, [params], [dir], [op], [mode]

    For example:

    SystemUtil.Run "iexplore.exe", "google.com",,, 3 'Show maximized

    By operation [op], it means which action is to be performed with ...

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.