Dynamic Object Recognision inside script
I am attempting to write a script that will allow me to use it for variable tests. The trick of this is that when I run the application, it names one of the objects after the file it loads (or just calls it ViewX). My question is this, is it possible to access the object repository to list all children objects inside the code.
Re: Dynamic Object Recognision inside script
1. Most objects have a QTP method name .ChildObjects, which returns a collection with all the objects under the current one in the object tree. It even allows you to filter which objects will be included in the collection according to thier attrributes.
2. Another way to approach this is by recording the object tree once, and use .SetTOProperty on the child objects, in order to change thier properties to match the current run.