Inserting a Copy of an Action

Now, you will insert a copy of the FlightOrder action.

Confirm that the ActionB test is open.
If not, choose File > Open > Test. Browse to ActionB and click Open.

Insert a copy of the FlightOrder action.Choose Insert > Call to Copy of 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. The actions from the ActionA test are displayed in the Action List.

Select the FlightOrder action. Note that the description of the selected action is displayed in the Action description box.

In the Location area, select At the end of the test. Click OK. The Copy of FlightOrder action is added to the end of the test. Note that the call to the copy of the action you inserted is just like any other action call in your test. You can modify the steps in the call to the copied action just as you would those of any other action call.

Modify the Copy of FlightOrder action.In the Keyword View, expand Copy of FlightOrder > Welcome: Mercury Tours > Find a Flight: Mercury. Select fromPort and click the Value cell.

Change the value in the Value cell to "London" (including the quotation marks) and click any other row in the Keyword View.

Call the Copy of FlightOrder action after the Sign_in action.
You want the Copy of FlightOrder action to be immediately after the Sign_in action. Since you cannot drag any action to be immediately after a reusable action, you must perform the following steps to change the order of the action calls.

Select the Copy of FlightOrder action and drag it immediately below the Action1 action in the Keyword View. A black line indicates the new position. To ensure that you position the Copy of FlightOrder action as a sibling of Action1 and not as a child, drag the line to the left until it meets the vertical dotted line.

Then, select the Sign_in action and drag it immediately below the Action1 action in the Keyword View. Ensure that you position the Sign_in action as a sibling of Action1 and not as a child. The Copy of FlightOrder action is now immediately after the Sign_in action.

Delete Action1 from the test.
Every new test contains a default Action1 action call. You can now delete the Action1 action call.

In the Keyword View, select Action1 and choose Edit > Delete or press the Delete key on your keyboard. A confirmation message opens. Click Yes to delete the action call.

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

Confirm that the original FlightOrder action was not modified.
Choose File > Open > Test. Browse to ActionA, and click Open.

Expand FlightOrder > Welcome: Mercury Tours > Find a Flight: Mercury. Note that the change of departure city you made in the ActionB test did not affect the original action in ActionA (New York is still the departure city in ActionA).

Comments

Popular posts from this blog

2.Areas of Deployment

Setting Actions as Reusable Actions

Sample QA/Testing Resume