Any Body suceeded in getting Object heirarchy through the object repository xml
im creating a framework in which i have a idea to get the object hierary from the object repository exported xml.
Example if user gives unique logical name "LoginID"
we need manipulate to =Browser("A").Page("B").Webedit("LoginID").
I have seen similar attempts. One issue is that the logical name would show up in many places. Also it was sometimes a button and an edit box on the same window.
As I remember your few post , You were taking the xml node in variable (I guess you are taking it for OR) also you are searching element in OR by RepositoryCollectionUtil. So effectively you are building a framework to deflate the OR and get the Object and Hierarchic.
You can build up the
1. Lookup table mapped with element<with Index> = Obj Hierarchic
Index will give you the Unique logical name for that.
Hi yogi, I'm planning to give unique logic name for each object. And regarding you suggestions building a look up table, I cant able to get that one
I remember seeing code in a HP QTP example that uses an iterative function that goes through the OR and makes a collection of the objects. I don't know exactly what it did, but it sounds similar to what you are trying to do. We used it as a starting point. I'm sorry that I could not give more accurate information. It is just something that I have seen and worked with as a launching point. Perhaps ask HP for this. I remember them having a good example.
The ObjectRepositoryUtil Object help gives an example of iterating through all the objects in a repository and displaying their properties.
I would think something like that would be very inefficient to build a framework around though. Finding the parents when only given the child node is particularly inefficient.
That's it. That is where I have seen it. I have been down that path. The harness did eventually work, but we had to have unique names or put an extension on the names so we would know which is which. Like btnOK editOK. It would read the whole screen and then put values in a spreadsheet for the ojbect types we were going to use. It took aobut a half year to work out. I don't think it was worth the effort.