In order to find an object during playback QTP need to store number unique attributes about the object. Most of such attributes you can access with
GetTOProperty, the web page can be closed, but you can call obj.
GetTOProperty("abc") - the information comes from Object Repository. (We just have found it doesn't work for ordinal identifier.)
Again:
GetTOProperty exists to find objects from Object Repository. Information about such attributes you can find in QTP help "
WebEdit identification properties".
GetROProperty - exists to find real, run time properties of an object. Another way to retrieve that information WebEdit("abc").Object.<property name>
Information about <property names> can be found here
http://msdn.microsoft.com/en-us/library/ms535841(VS.85).aspx (
Attributes/Properties).
QTP uses
TOProperties to match it with
ROProperties, that means
TOProperties of an object should be unique enough to match
only one object on the screen. If there is no such properties, QTP uses ordinal identifier index or location. If you have 3 similar objects, QTP will assign index:=0 to first , index:=1 to second, index:=2 to third object.
This index doesn't exists outside of QTP.
On Thu, Nov 20, 2008 at 11:54 PM, mabobine
<raheel...@gmail.com> wrote:
Thanks for the feedback..
Can you elaborate a little bit more on this
"...it wont work because the index is the QTP's index its not
application index. QTP will display only application data bnot its own
data...."
Isn't index the property of the test object? If yes, then as we can
play with the other properties, why can't we do the same with it.
Also, we can locate the index by providing the number by ourselves, so
why can't we provide the index prior to our guess of where it is
actually located.
Regards