Thursday, May 17, 2012

:: LoadAndRunAction ::


    LoadAndRunAction is the new feature in QTP that indroduced in the version 10.0. This method is used to load the action dynamically during run time.


   In the above picture, you are seeing that we can insert call to an existing Action. Actually, it will create links to the corresponding action before we start executing the script. You may have 100 Actions already mapped or linked to the driver script. But you going to run only the 10 actions. In that case, the remaining 90 actions will be loaded before the execution but actually those actions will not be executed. So,What If you want to load the action based on your need?
Here is the way to Load actions during run time. LoadAndRunAction method is used to load only the required action during run time. This will help you to save more time when you have more number of actions and you want to execute only few out of it.

How to Use:
    Syntax:  LoadAndRunAction "Test Name with path", "Action Name"
          Ex:  LoadAndRunAction "C:\Automation Scripts\Test1","Action1"

LoadAndRunAction load any reusable external action from another test during run time.

No comments:

Post a Comment