Micro Focus QTP (UFT) Forums
Object properties changing - not found in OR - 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: Object properties changing - not found in OR (/Thread-Object-properties-changing-not-found-in-OR)



Object properties changing - not found in OR - tmcken - 04-21-2009

I looked all over & can't find an answer or else I missed it.
I added an object (lets say a popup in IE) via recording to the OR. During the run most of the time QTP 9.2 finds the object in the OR. However, sometimes it can't. If I check the properties of the popup, the properties for the popup have changed for this one instance.

This is the script:

Code:
If browser("IEopen").dialog(Microsoft IE)".Winbutton("OK").Exist(1) Then
browser("IEopen").dialog(Microsoft IE)".WinButton("OK").click
end if
For those instances where the same popup properties have changed in the OR it will register as:
Code:
browser("IEopen_2").dialog("Microsoft IE").WinButton("OK")

Is there a way to tell the code to search the OR for another entry without having to stop the run and register another OR object?

I even tried this, but no luck:
Code:
browser("name:=IEopen*").dialog("name:=Microsoft IE*").WinButton("name:=OK*")


Thanks.


RE: Object properties changing - not found in OR - Tarik Sheth - 04-21-2009

You can click on the option where no new instance of an object will be created and it will update in the same object tree.
just rename "IEopen_2" to "IEopen" and it should work.


RE: Object properties changing - not found in OR - tmcken - 04-23-2009

I am not sure I understand what you are saying? I understand that the object can be moved to another location in the OR & rename it. Please clarify. Thanks.


RE: Object properties changing - not found in OR - Tarik Sheth - 04-23-2009

Put each object in the same hierarchy and no different instance like IEopen_2 should be created.
This will resolve the issue.