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
What is difference between shared and local object repository?
Output values? i want a practical example
When to use shared and local object repository?
Explain different types of checkpoints?
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
What are the features and benefits of quick test pro (qtp 8.0)?
Thanks....But can u tell me how i use the QTP for GIS with one Example...
Define Environment Variable in UFT and its uses?
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?
What is QTP and the use of QTP in TD?
Mention the test steps of qtp.
How will you check a web application for broken links using qtp?
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
what difference between runtime object and text object and what property they have. whether they have same properties or different properties.
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????