Actions in QTP
Actions in QTP is a Set of Statements for performing a Task/s. Actions are used to streamline the test process or flow.A certain flow can be divided into multiple actions. lets see the Purpose of Actions, Types of Actions and Operations on Actions.
Purpose of Actions:
- Use of actions help to get better understanding of the flow
- Writing once and using multiple times,It means same action can be called and used multiple times.
Actions are categorised in three types:
1) Non-Re usable actions- As the name suggest,This is An action that can be called only in the test in which it is stored, and can be called only once.
2) Re-usable actions- This is a type of action that can be called multiple times by the test in which it is stored , as well as by other tests.
3) External actions- A reusable action is part of another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
Operations on Actions:
- Creating an Action:Action can be created manually and any logical name can be given to the action.Action name should be unique.
Insert>call to new action>enter name of the action>click ok
- Splitting an action: We can split one actions into 2 actions at a time.Put a cursor on desired location>Edit menu>action>split action>Enter <Action 1 name> and <action 2 name>.
- Renaming actions:Action can be renamed.
Select desired action in action drop down box-> edit menu>action>rename action->modify the name->click ok.
- Deleting Actions: Deletion of action is allowed
select the action needs to be deleted->edit menu>action->delete action->confirm deletion.
- Calling an action:To call a particular action which is stored in some other test.The access will be only read only.
Select an action needs to be called->Insert>call to existing action>browse path of the test>select desired action>click ok.
- Copying an action:QTP allows to create same action with different names.
Insert->call to copy of action->browse path of the test->select desired action->click ok.
- Making an action reusable:This is important feature which allow to re-use and re-call a same action.
Select Non Reusable action ->edit >action>action properties>check reusable action check box >click ok.
there are more actions are coming on Qeworks.com 🙂