Wednesday, June 4, 2008

How QTP Recognize the Objects in AUT

When we record the application, QTP interact with an object and stores Test object properties in its Object Repository.
When the test runs, QTP maps the Test Object properties with the Runtime Object properties.
If it successfully maps the runtime properties, then test passes.
If not, test fails.

Test Object Properties - are properties of an object in the Object Repository
Runtime Object Properties - are properties of an object in the application.

Runtime Object is the actual object to which a Test Object can be mapped.
It is the actual object present in your AUT.

Example -

Open a Notepad and add objects in Object Repository
Then write script in QTP...
Msgbox window("Notepad").GetTOProperty("height")
'It gives you empty message. Because you didn't add height in Object Repository.
'Now try this
Msgbox window("Notepad").GetROProperty("height")
'You will get the height of the notepad window.

For Test Object, you have to add the property then only it will show in the test object properties list.
But for Runtime Object, always all properties are available.

We can use SetTOProperty method to change the properties of the test object, But we cannot change the properties of the Runtime Object.

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.