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  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 580 of 647    Print  
QTP Functions
how we can return a value from a function in qtp


  
Total Answers and Comments: 3 Last Update: December 20, 2007     Asked by: pvinilkumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 18, 2007 14:18:39   #1  
Anshoo_Arora Member Since: October 2007   Contribution: 384    

RE: QTP Functions
Function QTP(X, Y)
    ' some code
End Function

If You call QTP from within another Function/Sub
Then
Call QTP(X, Y)
else
QTP(X, Y)
End If

 
Is this answer useful? Yes | No
December 18, 2007 16:27:02   #2  
hal9000 Member Since: December 2007   Contribution: 1    

RE: QTP Functions
Hi

To call a function, we need to prepare the function in the function library
for eg: This is the function you prepared in the library :
function mywebinvoke()
systemutil.run "iexplore",www.yahoo.com
end function

Now to call this function go to the test in qtp and type,

mywebinvoke()

it will directly go yahoo page.



 
Is this answer useful? Yes | No
December 20, 2007 20:17:09   #3  
anitamittal Member Since: December 2007   Contribution: 1    

RE: QTP Functions
temp = ABC()
msgbox temp

Function ABC()
    ABC = "as"
End Function

You have to return the value using the function name as variable. Hope it helps!

Thanks,
Anita

 
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