QTP Forum


Join the forum, it's quick and easy

QTP Forum
QTP Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Poll
Keywords

Latest topics
» composite primary key
Virtual Objects EmptyThu Jun 19, 2014 11:31 am by thomasdfg

» How to identify the object when it is dynamically changing behavior
Virtual Objects EmptyWed Jun 18, 2014 6:37 pm by thomasdfg

» Patches for QTP 10, 11, 11.5
Virtual Objects EmptyWed Jun 18, 2014 6:04 pm by thomasdfg

» Retrieving data from Txt file into datatable
Virtual Objects EmptyWed Jun 18, 2014 5:32 pm by thomasdfg

» VB Script to count number of links in a web page.
Virtual Objects EmptyWed Jun 18, 2014 4:51 pm by thomasdfg

» Customized HTML reports in QTP
Virtual Objects EmptyWed Jun 18, 2014 4:42 pm by thomasdfg

» how to print values into a field of a web page, from a data table in qtp?
Virtual Objects EmptyWed Jun 18, 2014 4:37 pm by thomasdfg

» How to delete cookies using QTP?
Virtual Objects EmptyWed Jun 18, 2014 4:30 pm by thomasdfg

» When UFT Does Not Identify an Object
Virtual Objects EmptyWed Jun 18, 2014 4:23 pm by thomasdfg

November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar

Affiliates
free forum


Virtual Objects

2 posters

Go down

Virtual Objects Empty Re: Virtual Objects

Post by Gajre Thu Nov 08, 2012 4:02 pm

As far as I understand, Yes if the screen resolution changes, they should not work as the co-ordinates change when you change the resolution.
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 42
Location : Hyderabad

https://qtpelearning.forumotion.com

Back to top Go down

Virtual Objects Empty Screen resolution

Post by sriharish2 Wed Nov 07, 2012 3:44 pm

Hi Sir,

Does it vary if the screen resolution change, like the browser is maximized or minimized or altering with the screen? affraid

sriharish2

Posts : 8
Join date : 2012-10-31

Back to top Go down

Virtual Objects Empty Re: Virtual Objects

Post by Gajre Wed Nov 07, 2012 3:17 pm

Yes, suggestable when all these methods do not work. But few opt to use them even the childobjects or other methods work, may be due to lack of knowledge or just for the sake of using VO. Its upto the individual how he wants to automate a test.

I've mentioned this in the earlier comment.
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 42
Location : Hyderabad

https://qtpelearning.forumotion.com

Back to top Go down

Virtual Objects Empty Thank you sir

Post by sriharish2 Wed Nov 07, 2012 12:37 pm

Thank You sir!!

Is these applicable when an object is not identified in Child objects? Is it Like child objects? confused

sriharish2

Posts : 8
Join date : 2012-10-31

Back to top Go down

Virtual Objects Empty Re: Virtual Objects

Post by Gajre Wed Nov 07, 2012 12:32 pm

When the objects in an application are not identified by normal methods like: Object spy or descriptive methods like - childobjects, object (to acces native properties) etc using QTP, or the complete window/ screen is recognized as a single object, rather you spy on an internal object of the window. In these cases you'll be using the concept of virtual objects.

We can create virtual objects using Virtual Object Manager in QTP>Tools>Virtual Object Manager (following the Wizard instructions).

The created virtual objects will be stored as a VOT file in the following folder:
QuickTest installation folder\dat\VoTemplate

If you want to use the created virtual objects in other machine(s) or If you want to use the scripts which are using virtual objects in other machines, then you must copy the ".VOT" file(s) to the machines on which you want to run the scripts using these virtual onjects.
This enables maintenance activity as you need to move your ".VOT" files where ever you run the scripts using them. If you forget/miss to do the copy, then the scripts will not fail.
The best solution to overcome this problem is Descriptive Programming of Virtual Objects.
In this you need not create any objects using virtual object manager.
The Virtual Objects use the properties co-ordinates - x, y, width and height.
All you need to do is describe these properties & values in the line of code.
For example, in the below script I have virtually created a button under a page. If i execute this automatically that particular area will be highlighted. For this I haven’t created any virtual object using Virtual Object Manager.


Browser("title:=XYZ").Page("title:=XYZ").VirtualButton("name:=Submit","x:=100","y:=50","width:=50","height:=20").highlight

You can run the above line of code on any machine without creating a virtual object through virtual object manager or care about moving the ".VOT" files.
You may use description object for the virtual object as well:
Set VirtualDescObj = Description.Create()
VirtualDescObj("name").value="Submit"
VirtualDescObj("x").value=100
VirtualDescObj("y").value=50
VirtualDescObj("height").value=20
VirtualDescObj("width").value=41
Browser("title:=XYZ").Page("title:=XYZ").VirtualButton(VirtualDescObj).highlight
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 42
Location : Hyderabad

https://qtpelearning.forumotion.com

Back to top Go down

Virtual Objects Empty Virtual Objects

Post by sriharish2 Mon Nov 05, 2012 1:38 pm

Hi Sir,

Where do we use Virtual Objects? How should we use them?

sriharish2

Posts : 8
Join date : 2012-10-31

Back to top Go down

Virtual Objects Empty Re: Virtual Objects

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum