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

What is difference between shared and local object repository?

589


Output values? i want a practical example

1310


When to use shared and local object repository?

636


Explain different types of checkpoints?

562


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

1489






What are the features and benefits of quick test pro (qtp 8.0)?

601


Thanks....But can u tell me how i use the QTP for GIS with one Example...

1435


Define Environment Variable in UFT and its uses?

611


I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?

621


What is QTP and the use of QTP in TD?

602


Mention the test steps of qtp.

542


How will you check a web application for broken links using qtp?

554


any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in

3443


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1709


I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????

2157