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 capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)
What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me
Explain in brief about the qtp automation object model (aom).
What are the general steps involved in the data driven framework?
How many types of recording modes in qtp? Which will be used when?
How do you configure QTP AND Test director?
When and why to use descriptive programming?
Hi How to retrieve data from web element line by line?
Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in
give me an example where u used good judgement and logic in solving a problem
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?