1. What is an action? And what are the different types of actions present in QTP ?
Action helps in making the test script more modular. You can call the action from the same test and you can call the action from another test too.
There are three types of actions in the QTP
- Non-Reusable (Normal): The kind of action can be called once and from within the test in which it is defined.
- Reusable Action: The kind of action can be called as many times as you want. And can be called in other tests too.
- External Action: This is nothing but the call to the reusable action of another test as a “call to existing action“. These are read only actions.
2.
There are two ways to call the actions
- Call to Copy of Action:
You can call any reusable or non reusable action as the copy of action. After calling the action you will be able to see the new action in the action flow. And then both actions will be different means the change in any of the action will not be reflected to the other action. - Call to Existing Action:
You can use call to Existing Action with reusable actions only. - Calling Action from Same Test: If you are using Call to Existing Action to call the (reusable) action from the same test then you can edit the action but the changes will be reflected to the original action too and vice versa.
- Calling Action from Different Test: If you are using Call to Existing Action to call a action from different test then the action will be added as a External Action. And this will be read only action.
You will be able to see this in the test flow with name as Action Name [Test Name]
1 comments:
Hi,
Hi,
I have "action a" in "Folder A". I copied the "action a" into "Folder B" and renamed the action-a as "action B" and did little modifications in action B, again I copied the same action-a in to "Folder B" and renamed the action-a as "Action C" and did little modifications... In a new action first I used "call to existing action" to call "Action B", again I called "Action C" using "call to existing action" option. But it reflects in the new action as "Action B"... Can anyone help me to resolve this..
Post a Comment