Write a function which returns the addition of two numbers.
give the value of the numbers outside the function.

Answer Posted / sandeep guttikonda

1) Write the below code in notepad and save it as .vbs file.

Function Code:
Public Function Addition_Of_Two_Numbers (Value1,Value2)

Result = Value1 + value2
Addition_Of_Two_Numbers = Result
End Function

2) Open Quick Test Professional Functional Testing Tool

3) Go to File-> Settings-> Resources-> Click '+' symbol
under Associated Function Libraries: and upload the abouve
saved file.

4) Go to Expert View.

5) Write this VBScript Code:
Sum_Of_Two_Numbers = Addition_OF_Two_Number(3,4)
Msgbox "The Addition Of Two Numbers
= "&Sum_Of_Two_Numbers

This will display the answer 7 in a messagebox.

Note: You can change the constants 3,4 as you required.

Please let me know if you need any further info.

Thanks.

Regards,
Sandeep Guttikonda

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how will you load the test cases in ddt?

1600


How you can find the absolute value of the number in qtp?

530


Can we run multiple QTP scripts one after the other without manual intervention? How?

602


Explain the parameter in qtp?

587


HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?

1723






With what extension you can save the list of tests in a file to run in test batch runner?

574


how to know no.of mails in our g mail by using vb-script

1783


Discuss the QTP Environment?

634


What Folder Structure following in Keyword Driven Frame work?

2293


What is use of object spy?

618


How is recording done when a application is over lapping the QTP application it gives a message object not recorded

1578


after initiating one project for testing, when exacltly QTP tester role starts?

1413


what is defenetion of kiran can u tell me plz CVS, SVN

1576


How to analyzing test results using quicktest professional (qtp)?

594


how to write xml output check point bu useing descriptive programing .means without useing output check point

1658