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


Please Help Members By Posting Answers For Below Questions

What is CMMP and CMMH?

692


How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?

3440


can the activities of test case design be automated?

1450


Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji

2258


When should I use smart identification?

600






I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

1713


Explain different type of event trigger option.

535


What are the various types of Actions in UFT?

587


QTP 10.0 is not identifying web objects for IE 8.it is identifying like winObject.I installed HP patch QTPWEB_00037.Still getting issue

5505


we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1575


Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?

1509


What is the diff between image and bitmap check point?

595


Hybrid framework supports Descriptive programming. Is it true?

645


What are main panes available in qtp test browser?

529


Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ

1529