Programming Tests

Relevant for: GUI tests, scripted GUI components, and function libraries

GUI test actions and scripted GUI components are composed of statements coded in the Microsoft VBScript programming language. The Editor provides an alternative to the Keyword View for testers who are familiar with VBScript. In the Editor, you can view an action or scripted component in VBScript.

When working with GUI tests, and both scripted and keyword GUI components, you can also create and work with function libraries in UFT using VBScript. This enables you to increase the power and flexibility of your tests and components.

If you are familiar with VBScript, you can add and update statements and enhance your tests, components, and function libraries with programming. This enables you to increase a test or component's power and flexibility.

This section provides a brief introduction to VBScript, and shows you how to enhance your actions, scripted components, and function libraries using a few simple programming techniques.

Note: For details about using the text and code editor abilities available in the Editor, see The Editor.

To learn about working with VBScript, you can view the VBScript documentation available from the UFTHelp menu (Help > HPE Unified Functional Testing Help > VBScript Reference).

You can add statements that perform operations on objects or retrieve information from your application. For example, you can add a step that checks that an object exists, or you can retrieve the return value of an operation.

You can add steps to your action, component, or function library either manually or using the Step Generator.