Action handling in QTP Automation testing :
Description
Runs the specified action in the test.
Note: The RunAction statement can run only actions that are already associated with your test as part of the test flow. Therefore, in order to enter a RunAction statement in the Expert View for an external action, you must first insert a call to the action (Insert > Call to Action) or copy the external action (Insert > Copy of Action) into your test. Using this option associates the action with the test and also inserts a RunAction statement for you. After the the external action is added to the test flow, you can add additional calls to that external action in the Expert View.
If you insert a RunAction statement in the Expert View for an external action that is not already associated with your test as a part of the test flow, the RunAction statement fails. For more information on copying or calling external actions, see the HP QuickTest Professional User Guide.
Syntax
RunAction ActionName, [Iteration , Parameters]
Return Value
Variant.
If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction's RetVal argument. For more information, see ExitAction Statement.
Examples
The following example calls the SearchFlight action, and runs all iterations of the action.
RunAction "SearchFlight", allIterations
The following example performs the same call as the previous example, but runs only one iteration of the action and saves the returned value to the AxnVal variable.
AxnVal=RunAction ("SearchFlight", oneIteration)
The following example runs one iteration of the action, supplies a string value of MyValue for the input parameter, and stores the resulting value of the output parameter in a variable called MyVariable.
RunAction "Action2", oneIteration, "MyValue", MyVariable
Smart Identification In Qtp
Vbedit Identification Properties In Qtp
Find Given Value In Property
Object Identification By Descriptive Programming
Retrieve Value Of Property Using Qtp
Getroproperty In Qtp Description
Coding Conventions In Vbscript Visual
Programmatic Descriptions Of Objects
Accessing Native Properties
Object Spy In Qtp
Understanding Test Object
Smart Identification In Qtp
Vbedit Identification Properties In Qtp
Find Given Value In Property
Object Identification By Descriptive Programming
Retrieve Value Of Property Using Qtp
Getroproperty In Qtp Description
Coding Conventions In Vbscript Visual
Programmatic Descriptions Of Objects
Accessing Native Properties
Object Spy In Qtp
Understanding Test Object
Post a Comment