Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



How to call the userdefined functions to script? If i am stored 'add()' function in Libr..

Answer / 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

How to call the userdefined functions to script? If i am stored 'add()' function in Libr..

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

How to call the userdefined functions to script? If i am stored 'add()' function in Libr..

Answer / murali raju

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

How to call the userdefined functions to script? If i am stored 'add()' function in Libr..

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

Post New Answer

More QTP Interview Questions

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?

5 Answers   Accenture, IBM,


What is the Obect Repository type, we use in Automated Testing..in Real time.. Pls anybody can give the answer.. Thanks in advance...

5 Answers   Navis,


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

5 Answers  


I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?

0 Answers  


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.

3 Answers   TCS,


can u put checpoints for moving images

2 Answers   Accenture,


draw the qtp frame work?

0 Answers  


How does qtp identify the object in the application?

0 Answers  


if my application shows 100 records and in my database having 200 records how i can validate using QTP tool?plz exp. in detail?

2 Answers   Wipro,


How to handle run time errors?

9 Answers  


What is the limitation to XML Checkpoints?

4 Answers   CTS,


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?

3 Answers   Tech Mahindra,


Categories