Wednesday 23 January 2013

Step Generator (F7)


Step Generator


Step Generator is a feature of QTP, Library of Functions, used for generating the Recordable and Non-Recordable steps.

Navigation: Insert menu->Step Generator

Or

Use Shortcut key F7

The Step Generator enables us to add steps by selecting from a range of context-sensitive options and entering the required values. In the Step Generator dialog box we can define steps that use:

Test object operations (tests only)
Utility object operations
Calls to library functions (tests only), VBScript functions, and internal script functions
For example, we can add a step that checks that an object exists, or that stores the returned value of a method as an output value or as part of a conditional statement. We can parameterize any of the values in our step.

Note: we can use the Step Generator to insert steps in tests and function libraries. Hover, in function libraries, we cannot use the Step Generator to access test object names or collections, or to access the list of library functions.

Before we open the Step Generator to define a new step, we first select where in our test the new step should be inserted.

After we open the Step Generator, we first select the category for the step operation (test object, Utility object or function) and the required object or the function library. We can then select the appropriate operation (method, property, or function) and define the arguments and return values, parameterizing them if required.

The Step Generator then inserts a step with the correct syntax into y test. We can continue to add further steps at the same location without closing the Step Generator.

We can open the Step Generator from the Keyword View, Expert View, or Active Screen.

No comments:

Post a Comment