Write a function which returns the addition of two numbers.
give the value of the numbers outside the function.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / kshama
Thanks a lot Sandeep.........
its really helpful..
Is This Answer Correct ? | 2 Yes | 1 No |
How can you delete the results file (XML)
What is All object and Local object in Object Repositary? Explain me please.
what is Compile Module in QTP? what exactly it contains Functions or Actions?
Is text area check point supports for web applications?
How would you parameterize the text field "Country" and the same "country" when it appears as combo field on other page with text field city and same with City combo field?
How can you capture(Read) the values from a Table?
what is the latest version of QTP? Main difference between 9.2 and 10 version
What is debugging? How you debug your script?
What exactly is the difference among all the three recording modes.
When we parameterise some field ex. Textbox is there any way that we can generate a specefic number of random values (For alphabetical values if possible) instead of manually entering values in the data table
How to record object in runtime. I am testing one Image website in which every time image change on home page.so if i records the image list but during running image get change, and QTP gives error
WHAT IS THE DIFF BTW KEYWORD DRIVEN TESTING AND DATA DRIVEN TESTING?