| || |
how to create virtual objects
plz tell me how 2 create virtual objects?in which situations we create?how to write d code in qtp descriptive programming?
Re: how to create virtual objects
Part 1: In what situation it is used ?
If the application that you are automating has a object that cannot be identified and classified as belonging to a specific Test object class.
Say there is an object which completely behaves like a button , but it does not fall in any of web,std windows,ActiveX or VB Test object class.
i mean to say that if you use GUI spy and point it , you wont see either Test object properties or methods.
In simplest form - Use virtual objects when QTP does not identify object [img]/images/graemlins/smile.gif[/img] , it should be last resort.
Part 2: plz tell me how 2 create virtual objects?
First you should know what you want to define as a Virtual object & why ? , and how closely it behaves like some standard object.
It should allow click and double click , else there is no point creating a virtual object.
1. search for New virtual object creation in tools menu
2. Virtual object wizard will open
3. Select the standard class
4. wizard prompts you to mark object,
5. Mark the co-ordinates with cross hair
6. Assign a parent to the marked Virtual object
7. further steps are fairly self representative in Virtual Object wizard
8. Add any more Virtual objects if required
9. If you don't want Virtual objects , you can either remove or delete from Virtual Object definitions(search the utility in tools menu).
* Virtual objects do not overlap over one another
* Try to mark when the screen is in consistent maximized/minimized condition , so that it is consistent during run sessions.
Can use some statements in our scripts to maximise/minimize the screen to certain size.
* marked Virtual object is relative to Parent object