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 |
We have a dynamic webtable where rows keep on adding.I have to click on particular row where the status changes to Update or Save.How do you click on Status(either it can be Update or save)
explain virtual object? in detailed? pls any one explain me?
Explain about reusable actions?
When should u feel that u can stop testing now? The following are few of the common Test Stop criteria:
Iam trying to write script for Rediffmail Page,in doing so the script line for go button is not accepting. Is their any other way other than . Browser("micClass:=browser").Page("micClass:=Page").Link ("micClasss:=Link","name=go")
how u track bugs using Test director in manual testing.
Explain building blocks of the bpt framework ?
How u connect bugzilla with QTP
1 Answers Deloitte, TCS, Wipro,
The interviewer asked me when u recorded one application.object repository properties are saved with .tsr extention. in qtp expert view wherever mouse is there that snapshot displayed in active screen but some recored script lines are not displyed in actives screen y?
How many tabs are available to view your test in a test pane and what are they?
How should I check my code( Before going to execute) without executing the script in QTP
How the objecs properties are identified?Tell me in Hierarchical order?