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

Answer Posted / sandeepguttikonda

PLEASE REFER THIS ANSWER.
Sorry Missed few Lines in the above posted answer. Please
refer this.

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

6) Save this Action and run(F5) it.

This will display the answer 7 in a messagebox.

Note: You can change the constants 3,4 as you required.
Example: if we want to know the sum of 13 and 1 we
will get the answer as 14.

Please let me know if you need any further info.

Thanks.

Regards,
Sandeep Guttikonda

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

563


What r the different filters in defect in quality center

3285


hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?

2807


What is the difference between shared and local object repository?

617


What is the Difference between test object and run time object?

612






Explain the difference between call to action and copy action?

523


What are the properties you would use for identifying a browser and page when using descriptive programming?

634


What is test object model in quicktest professional (qtp)?

550


What is accessibility check point?

660


i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click

1470


Difference between copy to action and call to action?

594


Pls can anyone give me the entire code for the Keyword driven framework with respect to he Flight Reservation Window in detail with explanation. Pls explain in detail stepwise. Thanks a lot. Pls very urgent?.

1523


What are the types of object repositories? Which one is you using?

621


Explain object spy in qtp.

588


Suppose I want fail that check point? How can you do that?

599