Tuesday, 19 January 2016

QTP - 34 - Significance of each type of action call

We can create/call an action directly from an existing action by right clicking in the script area :
Action Properties

So basically we can see here that there are three options to call an action. Lets see significance of each one of them :

1) Call to a New action - This option is used to insert  a new action from the  existing action.

2) Call to Copy of an Action - This option inserts a copy of the existing action.
As the name says this option directly copies all the attributes of the action which we are calling. It copies checkpoints, repositories, data tables and action tab in data table. Since this is the copy of the source action so it is always editable and any changes made will be local only. The source action remains unaffected. We can use this functionality with both the reusable and non-reusable actions. Target can be changed without modifying the source.

3) Insert call to Existing action - Inserts a call to existing reusable action.
This is different from the above type of the action. Only the reusable action can be called using this action. All the attributes like checkpoints, repositories,etc are in read-only mode and are non editable. The action can be modified in the that test only in which it was created. Once the source action is changes all the targets will be changed.

Note : If we have to use an action with modification then we can go for " Call to copy of an action" and if modification is not required then we can go for "Call to Existing Action".

No comments:

Post a Comment