By Default ,QTP don't provide the feature ,which you are looking at..

you have to use WSC to create a custom COM components..

 We can first use the WSC to create a custom COM components, and to ensure
that calls can be used CREATEOBJECT

[image: 
image]<http://p.blog.csdn.net/images/p_blog_csdn_net/zzxxbb112/601846/o_image_4_633921921237656250.png>

2. Open the Run Enter regedit into the registry to find the path:
HKEY_CURRENT_USER \ Software \ Mercury Interactive \ QuickTest Professional
\ MicTest \ ReservedObjects \

New Item: Zzxxbb

[image: 
image]<http://p.blog.csdn.net/images/p_blog_csdn_net/zzxxbb112/601846/o_image_6_633921929889218750.png>

3. After entering the

   - New string value ProgID, numerical procedures for the COM component ID,
   here we enter the zzxxbb.WSC
   - New string value UIName, value is the name of the subject of
   reservations, here to fill Zzxxbb
   - New DWORD value VisibleMode, value for the display mode, where the
   complete control that automatically shows where input 2

 [image: 
image]<http://p.blog.csdn.net/images/p_blog_csdn_net/zzxxbb112/601846/o_image_8_633921934166093750.png>

4. Have set then we can open QTP see that we have defined the subject of
reservations from the

   - Show results F7

 [image: 
image]<http://p.blog.csdn.net/images/p_blog_csdn_net/zzxxbb112/601846/o_image_12.png>

   - COMPLETE WORD display the results

 [image: 
image]<http://p.blog.csdn.net/images/p_blog_csdn_net/zzxxbb112/601846/o_image_14%3Cmce:script%20type=>

   - IntelliSense Results

[image: 
image]<http://p.blog.csdn.net/images/p_blog_csdn_net/zzxxbb112/601846/o_image_16.png>

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

Reply via email to