Creating VAPI-XP code in ALM and UFT?

Now we know how to create a VAPI-XP in ALM  .Our next target is to utilize this to code and write our first workable piece of code in the form of  “Hello World!!” program :).


Delete the default generated code in VAPI-XP testing tool.
VAPI-XP Default code
VAPI-XP default code
Replacing the default code with following lines of code.
VAPI-XP Code in Test Script


Create a local text file (Name and Location of the file should be same as we used in VAPI-XP script above).Paste the following lines of code in the .txt file.

Sub Test_Main(Debug, CurrentTestSet, CurrentTSTest, CurrentRun)
                msgbox “Hello World!!”,,”My First VAPI-XP”
End Sub

Select the VAPI-XP and move to Test Lab for Running.
After successfully running the script we will get the following message.
Result of VAPI-XP
Hello World!!

Running UFT using VAPI-XP

Leave a Reply

Your email address will not be published. Required fields are marked *