Ordinal identifier is the one of the most important property of any object.
You can see this property at right side of object repostiry window in QTP.
Press Ctrl+R to open object repository window.
Quick test is using following types of identifier to identify an object.
Index: Indicates the order in which the object appears in the application code with respect to other objects.
Location: Indicates the order in which the object appears within the parent window, frame, or dialog box with respect to other objects.
Creation Time: Indicates the order in which the browser was opened with respect to other opened browsers.
Now lets come to the practical observation that I have in ordinal identifier. During my development and testing phase I faced one error that was related to index type of ordinal identifier.
Error handling using index type ordinal identifier:
When any webpage contains same objects at more than one place than you may get error like “more than one objects matches”.
For e.g. I have “completed” text at more than one place in my webtable or webpage. So When QTP tries to click on “completed” text on webtable, QTP may find more than one object which matches “Completed” text. So at this instant QTP will throw this kind of error.
To avoid this “more than one objects matches” error:
You have to change property of ordinal identifier from none to index,0. (Please refer above figure for more clarity) You can see in figure that I have changed property of ordinal identifier from none to index,0.
After changing this property you can overcome this error.