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 can you pass value one action to another action?

773


How do you capture tooltip using QTP?

825


What is quicktest professional (qtp window?

796


What is quicktest professional?

771


What are the various types of Actions in UFT?

804


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

800


Hi,All How to create a link in excel sheet using qtp

3211


Hi All, How to Compare two strings character by character in QTP

1250


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1672


I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”

795


An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?

875


when to start the automation?

1685


In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?

1679


How do Parameterization and Data-Driving relate to each other in QTP?

826


is it possible to add sheets to excel at runtime

3628