UFT uses VBScript as its programming language, but it also has a wide array of commands that are very useful for various purposes, such as flow control. In this section, we shall provide a list of commonly used commands and some others, which the authors think are useful, accompanied by examples and explanations.
Proceed with the following steps:
DescribeResult
: This returns a text description of the specified error code. For example, to print the description of the last runtime error, use:Print DescribeResult(GetLastError())
ExecuteFile
: This is used to execute the VBScript code in a file (function library) during runtime. This means, instead of associating a function library to your test during design time via the UFT GUI (via File | Settings | Resources), you can call it directly using the following syntax:ExecuteFile FilePathname
After the statement is executed, all the...