To create test steps in a GUI test, you have to use the objects in test steps and instruct UFT what actions to perform on the test objects. This enables UFT to replay the actions on your application by translating the test object methods (actions) into actions on the run-time objects in your application.
To assist with this, UFT has a number of different ways to add test steps:
You select your test objects in the step grid, and add the necessary actions (methods) for these test objects. The Keyword View automatically sorts the object hierarchy as needed.
After you select the appropriate objects and methods, your test steps are displayed in a grid that shows the object name, object method, any parameters added, and a documentation summary of the step.
In the Editor, you type in the objects (including the necessary hierarchy for the objects as needed), along with the object method and parameters. If you are experienced with writing code for your application, this can be an easier way to create test steps.
|Recording||When you record in your application, UFT translates your actions into test steps, displaying the object name and the action (method) performed on the object. This enables you to perform the test as a user would and in turn have UFT automatically create the test instead of manually editing it inside UFT.|
|Toolbox pane||When you select a GUI action tab in the document pane, UFT automatically displays the associated objects and functions for that action in the Toolbox pane. Then, you drag these test objects (or functions) into the Keyword View or Editor , and UFT automatically creates a step with the object. (You still need to provide the method for the object however, after dragging it from the Toolbox pane.)|
|Step Generator||Using the Step Generator dialog box, you can select and provide all the details for the test step in a single dialog box. The Step Generator enables you to choose any test object currently associated with the selected action, the method for that action, and the necessary parameters. After you select this information, UFT inserts a step in the selected place with all the details.|
In the exercises that follow, you will create test steps using each of these methods.