Ordinal identifier in QTP and Error handling

By | June 19, 2009
Ordinal identifier in QTP and Error handling:

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.

If you like this article, You can subscribe through mail.

6 thoughts on “Ordinal identifier in QTP and Error handling

  1. Anonymous

    Thanks a lot,

    I am james,

    I also faced this kind of weird erro, now that is solved kudos to you.

    Again thanks.

    Reply
  2. Guest

    Now I am facing the webtable issue, every time Webtable index is changing dynamically, so i don’t want to use index property..in that case how to solve the problem

    Reply
  3. shiv

    Hello Guest,
    I am Shiv
    Can you explain your issue in more depth?
    What do you want with webtable? do you want to get data from webtable? or do you want to delete row? or just you want to click on any row of webtable? can you explain in more detail?

    Reply
  4. Hello

    My problem is different. When I record, QTP assign a new number next time I come back to click the same frame. I never be able to run the recorded test successfully. What might be the cause? another frame hidden somewhere? How do I solve this issue? Thanks!

    Reply
  5. Anonymous

    Hi,

    i am facing an issue. The application I am recording shows the host name on the screen. Thus my recording scripts and the object contains my host name.

    When pass the script to my colleague who has a different host name, he encounters and error because the same application will display his host name. thus, generating QTP error.

    how should i handle this difference in host name?

    thank you very much in advance.

    Edmund

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *