If I've defined the following object:
objWebEdit = Browser("abc").Page("home").WebEdit("username")
Is there a way to get the object objWebEdit's OR hierarchy? I.e. I would like to have a function which when I called, will return the object's OR hierarchy. Like below:
When I call this function, I would like it to return: "Browser("abc").Page("home").WebEdit("username ")"
You can give a try using the object native properties, but this may be different than QTP object hierarchy.
Try to explore the methods as below
-- Here to Learn and share ---
Look at the HP QuickTest Professional Object Repository Automation Reference help file.
Thank you Jonty, I've tried the object native properties, but as you said, it's different than the QTP object hierarchy.
Thanks for your reply. I've explored the Mercury.ObjectRepositoryUtil object for a while but it doesn't help. Which section or function you are referring to? Thank you.
Was just wondering, what might be the purpose of the funciton, since we will be providing with the entire object hierarchy as the input for the function?
Allen, that is the way QTP works.
So whatevery object hierarchy you retrieve using native methods may not match with QTP hierarchy.
I don't think there is a consistent way to match both, if you are able to pull them.