How to use Actions in QTP ?

Answer

  1. Independent of each other which  splits the selected action into two sibling actions
  2.   Nested Action which splits the selected action into a parent action whose last step calls the second, child action

Actions can access test-data stored in datasheets. QTP provides 2 type of datasheets 

  1. GLOBAL Datasheet: It is Unique for the entire test. Any Action can access and write data into Global Datasheet. Sheet is named "GLOBAL"
  2. LOCAL Datasheet: Equal to number of Actions in the sheet. An Action can read and write data into its own local Datasheet only. Sheet name =  "ACTION NAME". 

The entire purpose of creating Actions is to use them in other Test Scripts. There are two methods to import Actions into a Test

  1. Call to COPY of an Action : When you make a Copy of an Action , the action is copied in its entirety, including checkpoints, parameterization, and the corresponding action tab in the Data Table into the calling test . When you insert a copy of an existing action, you can make changes to the copied action, and your changes will not affect nor be affected by any other test. You can insert copies of both reusable and non-reusable actions
  2. Call to an EXISTING Action : Calls to actions are read-only in the calling test. They can only be modified in the test in which they were created. Enables you to use the same action in several tests and makes it easy to maintain tests. You can  make  calls to only "Reusable" actions.

If required you can use the following statement to exit an Action

  • ExitAction.
  • ExitActionIteration
  • ExitRun
  • ExitGlobalIteration

While executing a QTP script with Actions, you need to consider, Global Iterations &  Local Iterations

You can change the action iteration frequency by selecting Action Call Properties  > Run Tab

All qtp Questions

Ask your interview questions on qtp

Write Your comment or Questions if you want the answers on qtp from qtp Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---