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

Does quicktest professional is unicode compatible?

688


how to test Web application using QTP software

1515


What contains Data Driven Framework document in qtp?

1641


can u please explain what is the exact difference between qtp8.2 and 9.0

1889


Why we load add-ins in qtp?

827


Explain the concept of how quicktest professional (qtp) identifies object?

765


Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..

1549


what is the diff b/w assistive and mandatary rules of object repository in QTP???

1875


To which environments does quicktest professional (qtp) supports?

764


What are the advantages of qtp?

758


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

2019


what is test scheduleling?

2235


How the smart identification is used in real time?Please explain with an example

1773


Will down time for server and content maintenance/upgrades be allowed? how much?

825


How is a Step generator used in UFT?

875