Basic VBScript syntax

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

You use VBScript in UFT to develop actions, scripted components, or function libraries in the Editor that you can use in your GUI tests and components.

VBScript is an easy-to-learn, yet powerful scripting language. You can use VBScript to develop scripts to perform both simple and complex object-based tasks, even if you have no previous programming experience.

This section provides some basic guidelines to help you use VBScript statements to enhance your action, scripted component, or function library. For more detailed information on using VBScript, you can view the VBScript documentation from the UFTHelp menu (Help > HPE Unified Functional Testing Help > VBScript Reference).

Note: Each VBScript statement has its own specific syntax rules. If you do not follow these rules, errors will be generated when you run the problematic step. For details, see General syntax rules and guidelines and Formatting text.

Additionally, if you try to move to the Keyword View from the Editor, UFT lists any syntax errors found in the document in the Errors pane. You cannot switch to the Keyword View without fixing or eliminating the syntax errors.

See also: