Handle WebTable objects with long hierarchies
I have an application in which there is a long hierarchy of WebTable objects before there is an actual object that I need.
Hierarchy is like : =
Browser -> Page -> Frame ->WebTable ->WebTable ->WebTable ->WebTable ->WebTable ->WebEdit
The problem is that whe nI add the WebEdit object QTP only adds the first WebTable in the object repository and ignores the rest, as a result the run time performance of automation is extremely poor (Because QTP is finding the WebEdit in all the WebTables in the application), it takes around 2 mins to find a single object.
Any suggestions on how to deal with it would be helpful.
That is the behavior of QTP. While adding to repository it will choose the right hierarchy to add the object.
If you want to add specific table, use Object spy. Once u know the table add it in OR.
QTP simplifies the hierarchy & adds only the Page/Frame object as the parent object by default. But it is possible to recreate this hierarchy manually. The downside - maintenance issues.
Alternately, try the XPath property for identification. Remove everything else. Check if this improves performance.
If you want you can remove the webtable and just have the webedit and see if it helps. Also make sure in your reporting that Smart Identification is not being used
I find that:
Browser("name of browser").WebTable("name:= ") is often enough to use the table. It is good when the developers give the WebTables different names that QTP can see. Otherwise I have to use index or column names as a property.
Tags for this Thread