Statement completion

Relevant for: GUI actions, scripted GUI components, function libraries, and user code files

Statement completion enables you to increase programming speed and accuracy when typing in the Editor by providing dynamic lists of items in the form of tooltips, drop-down lists, or popup windows.

As you type in the Editor, OpenText Functional Testing displays items you can add to your statement, as well as the syntax relevant to what you are typing. OpenText Functional Testing provides this type of statement completion information, when available, for:

  • Activity-specific properties (API testing only)

  • Methods or objects you can use in your API test step event handlers

  • Function and method syntax

  • Objects you create in your code

  • Operations

  • Properties or operations that return objects

  • Structured parameters

  • Variable definitions and methods

  • Variables to which classes, objects or test objects are assigned

  • VBScript classes, user defined functions, or constants (GUI actions and scripted components only)

  • Reserved objects
  • Test objects and collections (GUI actions and scripted components only)
  • Utility objects
  • Note: (for GUI testing only) The list of available statements is displayed even if you typed an object that has not yet been added to the object repository. If the action contains a function, or the action or component is associated with a function library, the functions are also displayed in the list.

The available information differs depending on what character you type:

If you enter: Followed by: OpenText Functional Testing displays:

An operation name

space or Open parenthesis"("

The operation syntax, including its mandatory and optional arguments. When you add a step that uses an operation, you must define a value for each mandatory argument associated with the operation.

An argument

Comma (,)

The operation syntax, bolding the next argument for which you need to enter a value.

Relevant if you enter a comma after any argument value other than the last one in a step.

For certain operations, when you type the space or comma before an argument that has a predefined list of values, OpenText Functional Testing displays the list of possible values.

An operation or function name

Ctrl+Shift+Space

or

Select Edit > Format > Argument Info

The statement completion (argument syntax) tooltip for that item.

Ctrl+Space

or

Edit > Format > Complete Word

A dynamic list of the relevant:

  • operations

  • properties

  • user-defined functions

  • constants and local variables relevant to the current programming scope

  • functions and methods relevant to the current programming scope

  • options relevant to your GUI test or component, including:

    • test objects

    • utility objects

    • collections

If there is only one relevant item defined, its name is automatically entered in the step, without opening the list. For example, if you typed the beginning of the item name before pressing Ctrl+Space, and only one item matches the text you typed.

The beginning of an item in the statement completion list

The list of items, highlighting the first item (alphabetically) that matches the text you typed. Pressing Enter or Space adds the highlighted word to the step.