Forum Discussion

shivam's avatar
Occasional Contributor
5 years ago

Cannot use Wildcards for Dynamic object path and dynamic IDs of AJAX application

Hi everyone,


I am testing and Ajax application and facing problem with Dynamic object IDs. I am trying to use wild cards but it is not possible mos of the times as there are multiple objects in the hierrachy with same Classname/ObjectType properties. See screenshots. 

The only difference these objects have are the properties that I don't want to use for object identification (like height, width, conztent, text, ID, offset and similar...) because we have seen in the past that either these props change in different enviornment or Development team can change these (lijke childs, ID) anytime over a period of time.

Is there any foolproof method for object recognition which I can try in name mapping?




  • shivam's avatar
    5 years ago

    Thank you tristaanogre  and LinoTadros  for the suggestions. 
    As you mentioned either we need to raise a ticket for DEV to improve these points. Secondly, limiting our tests to only one or two languages seems to me a good and easy solution at the moment (if the stakeholders agree).


5 Replies

  • LinoTadros's avatar
    Community Hero

    The full proof method is for you to enter a bug report against your R&D and let them know that dynamic naming is causing a problem in testing and that you insist on them naming their panels with a unique ID in order for you to complete your job successfully and not waste company's resources because they insist on doing this wrong.


    If that is not possible and R&D has no intention of developing the AJAX based site correctly, you might have to dig deeper to find a property or an array of properties for that Object that you can count on.  If all of them keep changing as you mentioned, I am not sure what TestComplete can do for you, there is no magic.


    Finally, what are you trying to do with the Panel? click it? access its children?  What is the end result?  You probably not interested in the panel itself but what's inside of the panel and that is what you should concentrate on.


    Let me know more and I will try to help


    • tristaanogre's avatar
      Esteemed Contributor

      I wouldn't shy away from using contentText.  It can help distinguish one object from another with some judicial usage.

      • shivam's avatar
        Occasional Contributor

        Ya, that is clear. But what about multilanguage applications ?
        In the application that I am testing has language switching option. And every customer has his own language library. That would be last option to do object recognition and validation with text content. (That too with multiple OR gates with different translated texts for each language).
        Is there any other thing we can do to reduce this kind of maintenence effort in future?