Cannot use Wildcards for Dynamic object path and dynamic IDs of AJAX application
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
TIA
Shivam
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
-Lino
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wouldn't shy away from using contentText. It can help distinguish one object from another with some judicial usage.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wouldn't run all functional test on all the languages. I'm assuming changing language doesn't change functionality. If you need to automate the checking languages, I would limit that to a few, just to make sure that the translation code is working. For that, you can use conditional mapping to use OR logic for properties.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
