Hi Roman,

I do agree with you that reagrding the usage of Execute File method directly
as in this. But previously I tried with the traditional way of associating
the function library with the script under test settings section.
But since I was looking for the Intellisense stuff and didn't get it using
that so I just tried using diff way... but then I came to know that the same
can achieved by creating DLL's and COM components.

So now I'm trying to create some DLL's of some sample codes. Would
appreciate if any can provide their valuable inputs on it as well.


Regards
Shalabh Dixit



On Sat, Apr 2, 2011 at 7:02 AM, Roman Zilber <[email protected]> wrote:

> couple of days ago, was posted answer on the same question...
>
> in Math.qfl
> write a function
> Func objFactory(name)
>   select (name)
>       Case "Maths":
>           objFactory = new Maths
>           exit func
>      Case ""other"
>          ....
>
> Endf
>
> in qtp action call
>
> onjMath = objFactory("Maths")
>
> do call any "ExecuteFile" it is a bad habit, you will be never able to
> debug the code
> add this file to the test settings
>
>
> On Tue, Mar 29, 2011 at 3:10 AM, 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
>

-- 
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

Reply via email to