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
How to creating an output value using quicktest professional?
How to data driven test for Win objects in QTP ?
How u will do versioning in QTP?
How to execute a winrunner script in quicktest professional?
what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?
How many types of recording modes in qtp?
how to disable the pop ups through QTP using a script
Did the scripts need lot of maintenance? If yes, why?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
How is UFT 11.5 version different from UFT 12.0?
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
How to record a qtp script ?
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
Is it possible to split an action? How?
Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan