Micro Focus QTP (UFT) Forums
Virtual Objects - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Virtual Objects (/Thread-Virtual-Objects--1539)



Virtual Objects - manojith1984 - 02-04-2009

Hi all,
a) Can anybody explain about Virtual Objects?
b) How does it identify Objects, is it via x,y, absx and absy co-ordinates?
c) Can Virtual objects be done by discriptive programming?
d) How to add a Virtual object in the OR after i create it by collections (Tools ->Virtual Objects-> Manager)?
e) Can i get any document which can explain me the whole concepts (A to Z) on Virtual Objects?


RE: Virtual Objects - Prafulla - 02-04-2009

a. Your application may contain objects that behave like standard objects but are not recognized by QuickTest. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box.
b. QuickTest identifies a virtual object according to its boundaries and relative to the parent object which u have assigned while creating virtual object.
c. Not clear to me
d. When you created the Virtual Object using the Virtual Object Manager, you must have selected the Class to which you wish to Map as well as specified a name for the Virtual Object.
In the script where you wish to use the Virtual Object include this sytanx -

Code:
Browser("").Page(“”).VirtualButton("VirtualObject").Click
VirtualButton - ObjectClass you mapped to. Specify the Object Class you mapped your virtual Object to.
Incase you are using VirtualCollections, you can also specify the CollectionName and use the Index to retrieve the required virtual Object.


RE: Virtual Objects - manojith1984 - 02-04-2009

Hi Prafulla,
Thanks a lot.. regarding c.
c. Can we use descriptive programming for virtual objects instead of going to virtual object manager and adding as a collection?
d. It would be helpful if anybody have any document regarding Virtual Objects specifically.