Micro Focus QTP (UFT) Forums
How to add a virtual object in Object repository ? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to add a virtual object in Object repository ? (/Thread-How-to-add-a-virtual-object-in-Object-repository)



How to add a virtual object in Object repository ? - njnirmal - 07-28-2009

hi..
What is this virtual object ? and is this possbile to add virtual object to Object repository ? Explain me with example or any script?
Thanks in Advance ..
HI..
I have read that we can write the script without define the object in the object repositry.? is this possible? is this descriptive programming ?
If yes that what are the advantage ?


RE: How to add a virtual object in Object repository ? - supputuri - 07-28-2009

Hi njnirmal ,

In general when objects are not identifed by QTP then we will go for virtual object concept. Where the objects will identified based on the coordinates and stored in the dat folder (not in Object Repository).
Please find the below snippet for Virtual Object (VO):
------------------------------------------------------------------------------------------
Code:
Dialog("Login").Dialog("Flight Reservations").VirtualButton("button").Click
----------------------------------------------------------------
In the above snippet the "OK" is added as virtual object.

2nd Question:
Yes, we can write the scripts using DP. where the scripts execution time will reduce i.e. the performance of the script will be more. We can handle the almost all the object by defining number of properties and values.

Please let me know if you need any more information.