Wednesday, 20 June 2012

Insert Call To Existing Action in QTP

This article explains the details about the call to existing action in QTP. We can insert call to the existing/ reusable action stored in the current test or stored in external test. The action will be copied to the current test in read only format. We can view the steps of the action in action view, but we can't modify them.

The called action's object repository is also read only.If the called action has data in the Data Table,we can select whether we want the data from the action's data sheet to be imported as local,editable or read only from the original action.But the columns and data from the called action's global date sheet is always imported into the calling test as a local, editable copy.

Assume that we need to modify the called external action. TO to this, we need to open the original action from the test in which it resides and make the necessary changes. This modifications will be reflected in all the tests which are call that action. If we use the original action's data when you call an external action,then the changes made to the original action's data are applied as well.

Note: We can view the location of the original action in the General tab of the action properties dialog box.

Steps to be followed to insert a call to an existing action:

01.Navigate to Insert> Call To Existing Action from Expert/Keyword view or right click at any step> Action> Insert Call To Existing.
02.Observe that a window is opened with a combo boxes named as From and Action.
03.From combo box represents the list of tests which contains the resalable action.
04.We can select some other actions by using the browse button which is located just adjacent to From combo box.
05.Action combo box displays all reusable actions in the test we selected.
06.Assume that we selected any one of the action.When we select the action, its type(Reusable Action) and description,if one exists, are displayed.It'll be helpful for us to identify the action you want to call.

Note:External actions that the test calls are also displayed in the list.If the action we want to call is already called from within the selected test,we can select it from the list of actions.This creates another call to the original action.

07.Next step is to decide the insertion place. We can insert either at the end of the test or after the current step.

08.Click on OK button and observe that the action is inserted into the test flow. We can move our action call to another location in our test by dragging it to the desired location.

Note:We can create an additional call to any reusable or external action in our test by pressing Ctrl while you drag and drop the action to another location at a parallel (sibling) level within your test scripts.

Tuesday, 19 June 2012

Call To Copy Of Action in QTP

 
This article explains about the call to copy of action and the steps to be followed.
 
We need to remember the following points when using "Call To Copy Of Action" in QTP.

01.When we insert call to copy of an action in a test, the original action is completely copied to the current test.

02.Complete action represents the various checkpoint, parameters, copied actions data table and any defined parameters.

03.If the copied action has objects in Local Object repository, the copied action's local object repository is also copied with the action.

04.The copied action is inserted to the current test as an independent.

05.The copied action will be non reusable even though the original action was reusable.

06.Once the action is copied to the current test, we can perform the operations like add, modify and delete.

07.Changes made to the copied action will not have any impact on the original actions and also the changes made to the actual action will not have any impact on the copied action.

Steps to create a copy of an action:

We need to follow certain steps to copy the action to current test.

01.Make sure that the selected Test is opened.[Ex: Test1].
02.We can navigate to the insert call to copy option by using any one of the following step.

    Method#01: Navigate to Insert> Call To Copy of Action.
    Method#02: Navigate to Keyword view> Selection the Action>Right Click> Insert Call to copy of action.
    Method#03: Navigate to Keyword view> Selection the Action>Right Click> Action> Insert Call to copy of action.

03.A window will be opened once the option "Insert Call To Copy Of Action" is selected.The opened window will have 2 combo boxes. One is named as "From" and another one is named as "Action".

04.The From combo box will have the list of Tests available. We can select a particular Test which contains the action to be copied or we can select a particular test by clicking on the browse button which is located just adjacent to the combo box.

Note: Assume that the browse button is clicked and the Test which contains the Action to be copied is selected. Now the system will ask for the path. We can choose either absolute and relative path.

06.Once the test is selected, we need to select the action to be copied.To do this, we need to click on the Action combo box which is located just below the From combo box.

07.Once the action is selected,the type of copied action[Usable/Non-Reusable] action will also be displayed and also we can find a text box "Exit New Action Properties". We have to select this option if we want to make some changes the copied action.

 Note:Assume that we didn't select "Edit New Action Properties" check box when selecting the action. We can do this later by navigating to Keyword View> Right Click> Action> Action Properties tab.

08.We can also find two more options named as "At The End Of the test" and "After the Current" step. We can select any one of these two options.

09.Once everything is finalized click OK and observe that the action is inserted into the test as a call to independent, non-reusable action.

10.We can move our action call to another location by dragging it to the desired location.

 
Back To Top