How to use Execute File Print Statement in QTP:
Executes the VBScript statements in the specified file. After the file runs, the definitions (functions, subroutines, classes, etc.) in the file are available from the global scope of the action's script.
Note: You cannot debug a file that is called using an ExecuteFile statement, or any of the functions contained in the file. In addition, when debugging a test that contains an ExecuteFile statement, the execution marker may not be correctly displayed.
Syntax
ExecuteFile File
Example
The following example executes the MyFunction VBS file in order to use the SomeFunction function in the action script.
ExecuteFile "MyFunctions.vbs"
x = SomeFunction ' Defined in MyFunctions.vbs
Description
Displays information in the QuickTest Print Log window during the run session. The QuickTest Print Log window remains open while the run session continues, until you close it.
For more information, see the HP QuickTest Professional User Guide.
Syntax
Print (Message)
Argument
|
Type
|
Description
|
---|---|---|
Message
|
String
|
String expression displayed as the message in the QuickTest Print Log window.
|
Example
The following example iterates all the items in the Flight Table dialog (in the sample Flight application) and uses the Print utility statment to print the content of each item to the QuickTest Print Log window.
Set FlightsList = Window("Flight Reservation").Dialog("Flights Table").WinList("From")
For i = 1 to FlightsList.GetItemsCount
Print FlightsList.GetItem(i - 1)
Next
Some more common QTP automation testing :
Report Event Filter In Qtp
Exit Test Iteration ExitActionIteration
Invoke Application Load And RunAction In Qtp
Set Last Error Get Last Error In Qtp
Exit Component Iteration In Qtp
Exit Component Statement
Exit Action In Qtp
Unregisteruser Func Statement In Qtp
Registeruser Func Statement In Qtp
Vbscript In Qtp
Some more common QTP automation testing :
Report Event Filter In Qtp
Exit Test Iteration ExitActionIteration
Invoke Application Load And RunAction In Qtp
Set Last Error Get Last Error In Qtp
Exit Component Iteration In Qtp
Exit Component Statement
Exit Action In Qtp
Unregisteruser Func Statement In Qtp
Registeruser Func Statement In Qtp
Vbscript In Qtp
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.