How to map objects during run time?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to map objects during run time?
The application I am automating will be coming with new features every 15 days. If I go with Name mapping, it may change evenly. I just want to map variables during tun time thru scripting.how can I handle this issues, What is the best approach for this. Please guide me.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you at least know some of the identifying properties of the objects you're going to interact with you could look for all of them during your test with the FindChild()-method.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You may consider 'Update Name Mapping during test run' option (https://support.smartbear.com/testcomplete/docs/reference/options/engines/name-mapping.html), but note that automatic namemapping is not recommended because it not always results in the optimal structure of Aliases and stable and reliable mapped objects recognition.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the inputs, but can I get anyway to map objects of application using this findchild or findchildren to one excel and use them.
Using the process name can I get all values of controls in one excel or xml format,
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So basically you want to map your application? Why not just use the namemapping then? I imagine that if your application changes to such extent as you describe that you'd have to constantly modify your test scripts anyway. It's probably not that much of an additional effort to update your name mapping as well.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are any number of "tricks" in NameMapping to help account for dynamically changing applications. There's Extended Find which allows you to "compress" the hierarchal tree of objects so that you don't have to have ever ancestor object mapped to identify an object. You can wild-card property values to account for slight differences in name changes. You can use the Conditional Mapping to use if/and/or logic for properties to make them more accountable.
As mentioned, the objects need to be identified in order for TestComplete to find them. If they are changing THAT drastically every 15 days that even using FindChild is not useful (since property values may change that frequently), your best bet is to go to your development team and request that they begin a practice of adding some static identifier property to critical UI objects so that you can maintain a stable automation project.
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
