GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 150 of 674    Print  
how do we create functions in qtp and call the functions?

  
Total Answers and Comments: 3 Last Update: November 25, 2008     Asked by: divya 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 23, 2006 00:22:25   #1  
qtptester Member Since: August 2006   Contribution: 20    

RE: how do we create functions in qtp and call the fun...
What ever the functions(one or many) you would like to write create in the notepad and save it as filename.vbs.Go to your test click on the testsettings in the TEST tab. Again go to the resources tab and click on the +(plus appears in green color) symbol and give the absolute path or u can browse.In the script where ever you want call using CALL funcName(parameters list).
 
Is this answer useful? Yes | No
February 20, 2007 23:16:48   #2  
Jenita Member Since: November 2006   Contribution: 8    

RE: how do we create functions in qtp and call the fun...
You are upsolutely correct.Also if you want to execute file Execute file and path name
Ex:Execute File C:Program FilesMercury InteractiveQuickTest ProfessionalTestslibrary1.vbs

 
Is this answer useful? Yes | No
November 25, 2008 03:53:56   #3  
tathagataM Member Since: November 2008   Contribution: 1    

RE: how do we create functions in qtp and call the functions?

Function_F1(Dyna_link)
Set obj Browser("Browser").Page("eProcurement_3").Link("Pending Approval for indent").Object.body.document
set Linkcollections obj.Links

msgbox “No. of Links is” & Linkcollections.Length
dim counter
counter 0
For each Element in Linkcollections

StrTitle Element.GetROProperty (“title”)
If StrTitle Expected_Title then
Element.Click
Exit For
Else
Counter Counter + 1
End If

Next

End Function


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape