You can create one or more VBScript. function libraries containing your functions, and then use them in any component by associating them with the component's associated application area. You can use the QuickTest function library editor to create and debug your function libraries.
You can register your functions as methods for QuickTest test objects. Your registered methods can override the functionality of an existing test object method for the duration of a run session, or you can register a new method for a test object class.
For more information, see Working with User-Defined Functions and Function Libraries and Working with Application Areas.
You can insert the VBScript. InputBox function into an associated function library to create a user-defined function that enables you to display a dialog box that prompts the user for input and then continues running the component. You can use the value that was entered by the user later in the run session. For more information on the InputBox function, see the VBScript. Reference.
You can send messages to the run results report by using the ReportEvent method, for example:
Reporter.ReportEvent 1, "Custom Step", "The user-defined step failed"
The results of each QuickTest run session are saved in a single .xml file (called results.xml). You can modify this file, as needed. You can use the QuickTest Test Results Schema (available from the QuickTest Professional Help) to help you customize your test results.
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/16792402/viewspace-571200/，如需转载，请注明出处，否则将追究法律责任。