GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 60 of 665    Print  
How to recall a function in QTP

  
Total Answers and Comments: 9 Last Update: May 01, 2007     Asked by: kumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 08, 2005 03:10:01   #1  
kumar_ls08 Member Since: November 2005   Contribution: 2    

RE: How to recall a function in QTP
Dear Lakshminarasimhan, Even i dont the answer...Can anybody answer this Question Plz.
 
Is this answer useful? Yes | No
November 09, 2005 15:48:23   #2  
Wasim        

RE: How to recall a function in QTP

Sorry i didnt get the meaning of recall, do u want to call a function in the script?


 
Is this answer useful? Yes | No
November 09, 2005 23:10:01   #3  
kumar        

RE: How to recall a function in QTP
Dear Wasim.... Assume that U are calling a funtion in QTP Script, & if u want to recall that same fuction in some other part of the same script..... What would u do ?
 
Is this answer useful? Yes | No
November 10, 2005 15:37:25   #4  
Wasim Member Since: November 2005   Contribution: 10    

RE: How to recall a function in QTP

There also u follow the same procedure. See the sample code

Function addition(x,y)
   z= x+y
   msgbox z
End Function

Call addition(1,2)
Call addition(2,2)

I think i am clear :)


 
Is this answer useful? Yes | No
November 10, 2005 15:37:49   #5  
Wasim Member Since: November 2005   Contribution: 10    

RE: How to recall a function in QTP

There also u follow the same procedure. See the sample code

Function addition(x,y)
   z= x+y
   msgbox z
End Function

Call addition(1,2)
Call addition(2,2)

I think i am clear :)


 
Is this answer useful? Yes | No
January 03, 2006 17:05:50   #6  
su Member Since: November 2005   Contribution: 2    

RE: How to recall a function in QTP

wasim

i didn't undestand, can you explain me clearly.


 
Is this answer useful? Yes | No
March 28, 2007 08:39:20   #7  
Manju        

RE: How to recall a function in QTP
Hi,1) we can Recall any function from any place of the script usingcall function-name(//with parameters)2) if you Reuse the same function then the last function will be called, below is sample codeCall add(1,2)Function add(a,b) MsgBox "This will not work "&eval(a+b)End FunctionCall add(1,2)Function add(c,d) MsgBox "This will work "&eval(c*d)End Function
 
Is this answer useful? Yes | No
April 14, 2007 00:46:25   #8  
RamuGoud@919866178926        

How to recall a function in QTP
Hai Kumar, I think we save the file with .vbs extension in external file and associate that library to the QTP, and we call that function in any test

Associate the library in this way

Test-->Settings-->Resources-->Add the external saved library

 
Is this answer useful? Yes | No
May 01, 2007 03:06:48   #9  
sreekanth chilam        

RE: How to recall a function in QTP
Actually, there will be 3 types functions :

--> Local script (Function definition and function call will be in script only )
-->
Built functions (Predefined functions , only we have to call these functions)
--> Library functions (these are functions defined in .vbs file (library file here Function calling will be done in script but not Function
definition )

you just define all required functions in one library file (store it one location)

Then load the library file into QTP environment by Test menu
--> settings --> Resources->
there click "+" and browse and load the
required library and click "apply",

Then you can call the function
anytime contained in above library file ......



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape