ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
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.
 Question Submitted By :: Srikanth
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    0 Yes 0 No
Murali Raju
 
  Re: 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
# 2
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
Pramod
 
 
 
  Re: 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
# 3
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
Murali Raju
 
  Re: 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
# 4
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
Umesh
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
hi i have one doubt i have 4 yrs exp in testing and iam working one mnc in north but i have completed my degree correspodene is the companies are accept in south side some people are tellig they won't agree but i need correct answer plz let me know which companies are taking and not taking thanks in advance  8
hw to create a frame work in qtp..what are the basic steps Infosys1
How many types of Recordings are there in QTP and what are they? First-Indian-Corporation6
What are the main attributes of test automation?  2
How to handle Run-time errors?  2
Suppose I want to use Index value of "WinEdit" in my script .But it is showing None in "Ordinal identifier" value of Testobject Details in the Object Repository.How to enable Ordinal Identifiers to capture the Index value of that particular WinEdit. I have selected "index" and clicked "OK" from Tools-> Object Identification Again I added same WinEdit to the Object repository But I did not get Index value..Please any one help me.How to enable Ordinal indentifiers  1
Thanks Rag... One more question, How we test the dynamic images which frequently changed?Using the bitmap checkpoint r any other options available.... Can u give the steps pls... Thanks  1
how to do spell check in QTP? reply please  7
Hi PLZ explain User Defined Functions in QTP with eample? Ordain-Solutions2
what are the cases in which we use XML and accessibility check points.  2
the presentation layer of my application is built using VB 6.0 and a series of C++ dlls and components. We do not use Java, VB.Net, C## or any other component that can be decompiled. We are automating the application using HP Quick Test Professional. It is not reconginizing the combo boxes, tabs etc.... Could you please suggest, whether QTP supports C++ dlls and components or not...if yes, could you please guide me, how to overcome this situation. Can we install any special add-ins for this C++? .When we are performing the recording/execution, the application becomes very slow. Your quick response will be highly solicited in this regard. Wipro1
How can you connect the database with QTP?  2
How can we open an Excel sheet through the script eSymbiosis6
What is Active Screen in QTP?  8
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code  1
In project module it contains 3-ok buttons with same properties who qtp identify its objects while runing ??  4
hi i have one isuue on selecting webcheckbox .there are 15 wecheckboxex i want to select every time 9 th one how can i select plese help me regards balaji  3
How to handle run time errors?  5
We are using the QTP version 9.0 where we want to call objects from global repository for a particular function at runtime for increasing the performance of framework.We are actually looking for loading the objects under test (OAT) dynamically when script runs and would like to unload the same once the execution of the script is completed.  2
how quick test record on dynamically generated urls and web pages. Infosys2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com