Book Image

Advanced UFT 12 for Test Engineers Cookbook

Book Image

Advanced UFT 12 for Test Engineers Cookbook

Overview of this book

Table of Contents (18 chapters)
Advanced UFT 12 for Test Engineers Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 the file supplied as a string argument with the possible values of open, edit, explore, find, or print. If omitted, the open action is performed. Sending edit with the pathname to a text file will open the default text editor (by default, Notepad...