Inserting Calls to Actions

First, you will insert calls to the reusable Sign_in and ReturnHome actions from ActionA into ActionB.

Open a new test  .
For more information, see step 1 of Recording a Test.

Insert a call to the Sign_in action.Choose Insert > Call to Existing Action.

The Select Action dialog box opens.

Click the browse button next to the From test box. Select the ActionA test in the Open Test dialog box, and click Open. Note that only reusable actions from the ActionA test are displayed in the Select Action dialog box.

Select the Sign_in action. In the Location area, select At the end of the test. Click OK. The call to Sign_in [ActionA] action is added to the end of the test as a call to an external action with the icon.

Note that you cannot expand the Sign_in action call in the test flow in the Keyword View. To view the steps in the Sign_in action, select it from the Action List. The action call you inserted is read-only. To modify the action, you must open the original (ActionA) test and modify the action there.

Select Test Flow in the Action List to return to the main flow of the test in the Keyword View.

Insert a call to the ReturnHome action.
Use the instructions in step 2 to insert a call to the ReturnHome action from ActionA. The ReturnHome action is added to the end of your test.

Note: When you insert a call to the ReturnHome action, Sign_in [ActionA] is selected in the Keyword View. Since the Sign_in action is read-only, you cannot select the location in your test in which to insert the call to the ReturnHome action. Therefore, the action call is automatically added at the end of the test.

Save the test.
Choose File > Save or click the Save button . Save the test as ActionB.

Modify the original ReturnHome action.
Choose File > Open > Test. Browse to ActionA, and click Open.

Double-click the ReturnHome action icon to display its contents. (This is equivalent to selecting the ReturnHome action from the Action List.)

Make sure that the Comment column is displayed in the Keyword View. If it is not, right-click on any Keyword View column header and select Comment from the displayed list.

In the Keyword View, select the ReturnHome action icon and choose Insert > Comment to add a comment about the purpose of the Home step. The Insert Comment dialog box opens.





In the edit box, enter: Return to page used in first step of the test. Click OK.

The comment step is added as the first step in the action, and you can see the comment text in the Comment column of that step.

If the comment is too long to see, it is displayed in a tooltip when you move your cursor over the Comment column.





Save the test.
Choose File > Save or click the Save button .

Confirm that the modification made in the original ReturnHome action is also included in the calling test.
Choose File > Open > Test. Browse to ActionB and click Open.

Double-click the ReturnHome [ActionA] action icon to display it. Note that the comment you added to the original action (ActionA) also exists in the calling test (ActionB).

In the Action toolbar, select Test Flow from the Action List to return to the main flow of the test in the Keyword View.

Comments

Popular posts from this blog

2.Areas of Deployment

VB SCRIPT TUTORIAL

Setting Actions as Reusable Actions