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 |
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?
What is the Obect Repository type, we use in Automated Testing..in Real time.. Pls anybody can give the answer.. Thanks in advance...
hi all need one help . i want scroll down and up but thing the holl page is taking webtable. i need to scroll down and up using scroll tab any bodu knows plz help its urjent regards balaji
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
I have test cases in excel sheet but i am using quality center.How can i copy the testcases from excel sheet to quality center?explain this process.
can u put checpoints for moving images
draw the qtp frame work?
How does qtp identify the object in the application?
if my application shows 100 records and in my database having 200 records how i can validate using QTP tool?plz exp. in detail?
How to handle run time errors?
What is the limitation to XML Checkpoints?
1.can we parameterise object repository?how we can do it? 2.there is a name "mallikharjun".i want to get the vowels in it through VBSCRIPT?