Add steps from the Toolbox pane

This exercise describes how to add steps to your test by dragging objects from the Toolbox pane on the left of the main UFT window. The Toolbox pane is another convenient method of displaying all the objects associated with the action, and available for you to use.

This exercise requires that you've added the relevant object repositories and test objects to your test. For details, see Create object repositories.

Add steps to the SelectFlight action

This procedure describes how to add steps to the SelectFlight action from UFT's Toolbox pane.

Do the following:

  1. Start with the MyFlight solution and test open to the SelectFlight action, and the Keyword View displayed.

  2. If you don't see the Toolbox pane on the left, click the Toolbox toolbar button to display it.

  3. In the Toolbox pane, expand the Test Objects tree, and drag the object to the Item column in the Keyword View.

  4. In the Keyword View, click in the Value cell and enter 0,0.

    This tells UFT to select the first item in the table, which is the first flight listed on the SELECT FLIGHT page.

  5. Add another step from the Toolbox pane to click the SELECT FLIGHT button at the bottom right of the page. This will continue with the flight reservation.

    From the Toolbox pane, drag the to the next row in the Item column of the Keyword View.

    A new step is added to your action, with the default Click method listed in the Operation column.

  6. Save your test, and continue with one of the following:

Back to top

View your steps in the Keyword View

In the Keyword View, the SelectFlight action should look like this:

Back to top

View your steps in the Editor

In the Editor, the SelectFlight action should look like this:

WpfWindow("Micro Focus MyFlight Sample").WpfTable("flightsDataGrid").SelectCell "0", "0"
WpfWindow("Micro Focus MyFlight Sample").WpfObject("SELECT FLIGHT").Click

Back to top

Next steps: