How to call the userdefined functions to script? If i am
stored 'add()' function in Library functions folder. i want
to cal that function in my script.

Answer Posted / murali raju

Instead of add name put the add1 as ur function
name...because add is keyword

Function add1(a,b)
c=a+b
add1=c
End Function 'put the function .vbs file and save it c
drive with the file name addition.vbs

write the below script in ur qtp

ExecuteFile "c:\addition.vbs"
x=add1(2,4)
msgbox x 'it will be prints 6 in the msgbox

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of recording modes in qtp? Which will be used when?

543


How will you check that your test cases covered all the requirements?

553


How would you export a script from one pc to another in qtp?

651


Is QTP supports Unix. If yes, then how the test automation is done?

1718


How to analyzing the checpoint results?

510






How to explain a banking project in interview as a test engineer???

2589


when to start the automation?

1471


How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing?

561


How often were they executed?

2030


Object repositories types, which and when to use?

571


Without using gui map editor we can recognize the application in winrunner ?

598


Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks

1890


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

571


Are Shared ORs read-only?

621


Does Low-level recording capture mouse movements?

580