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.
Answers were Sorted based on User's Feedback
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 |
Answer / pramod
But your code is giving me acess denied error
how to save the function as .vbs thorugh QTP or VB
| Is This Answer Correct ? | 0 Yes | 0 No |
Hello...pramod..Put the function in notepad and save
as .vbs extension then call through the above execute file
statament in qtp ...ok.na..
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / umesh
Save your functions in a notepad and save it as a .vbs file.
Under Test Settings - Resources tab, Associate your .vbs
file as a Library.
Call the .vbs file as a header in your script and use all
the functions.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to build scripts that access data from external sources?
Does QTP is "Unicode" compatible?
How are actions and functions different in QTP?
What is the process for creating an automated test script using QTP assuming you have reviewed the manual test case and understand the requirements?
In key word driven framework,we will rename the logical names of objects,why?
How i can change shared repository to per test repository in qtp
In qtp,how to interact tool & application build?
In how may ways we can use checkpoints to an application using QTP?
what is the difference between data table and spread sheet?
write vb script code to delete the duplicate values in an array.
BEst INstitute for QTP & SELENIUM
What is throw object?