you don't need to create any class just make two functions of ADD and SUBTRACT as you made earlier and save these function as .
VBS files seperately then call thses VBS files ExecuteFile (C:\TestLibrary\ADD.vbs) and ExecuteFile (C:\TestLibrary\Subtract.vbs) QTP support VB Script and VB Script does not support Class it supports functions On Tue, Mar 29, 2011 at 12:40 PM, Shalabh Dixit <[email protected]>wrote: > Hi All, > > I created a function library math.qfl and in that i have created a > Class with name "Maths". In the class I have created 2 functions > Add_Numbers and Sub_numbers.. as follows: > > Class Maths > Function Add_numbers(a,b) > c=a+b > msgbox c > End Function > > Function sub_Numbers(a,b) > c=a-b > msgbox c > End Function > End Class > > Now When I assiciate this library with my test and try to access the > class functions using the class objects, the list of functions in the > class are not being displayed by QTP. i.e we need to manually type the > full name of the functions: > > ExecuteFile (C:\TestLibrary\Math.qfl) > Set objMaths=New Maths > objMaths.Add_numbers(2,3) > > I want that when we type "objMaths." then all the functions in the > class gets displayed by the qtp intellisense. > Can anybody please help me in this. > > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
