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
Does quicktest professional is unicode compatible?
how to test Web application using QTP software
What contains Data Driven Framework document in qtp?
can u please explain what is the exact difference between qtp8.2 and 9.0
Why we load add-ins in qtp?
Explain the concept of how quicktest professional (qtp) identifies object?
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..
what is the diff b/w assistive and mandatary rules of object repository in QTP???
To which environments does quicktest professional (qtp) supports?
What are the advantages of qtp?
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..
what is test scheduleling?
How the smart identification is used in real time?Please explain with an example
Will down time for server and content maintenance/upgrades be allowed? how much?
How is a Step generator used in UFT?