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 are the features supported by UFT?
How to explain a banking project in interview as a test engineer???
what is the hierarchy to use properties in descriptive programming
What will be happen if i load object repository at run time, but it has already associated.
What is the syntax to call one action in another?
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
How to find the difference between 2 dates in qtp?
What do you to script when objects are removed from application?
Which recording modes need more memory?
How many types of recording facility are available in quicktest professional?
I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance
Hi All, I have QTP installed on my machine but the application under test is on remote machine. I need to automate the scenarios which consist of automatically enter the remote machine through IP address ,record the application in remote machine and run it also when played. Can some one tell how to record the application in remote machine.
breef description of batch testing ?
What is the difference between per-action and shared?
How may types of defects identify application or your currently working application?pls give me answer..