Forum Discussion
A more robust solution is to edit the mapping and select properties to use for your mapping criteria where the combination of those properties will uniquely identify your object. This takes a bit more skill and may require the use of selecting required children, wildcarding, and possibly building regular expressions.
Probably the BEST solution is that, if you have a good relationship with the developers, have them create some sort of property on the object hat you can use as an identifier or have them modify their code to reduce or eliminate the randomization.
- Jager8 years agoNew Contributor
Where i should replace name with wildcard (*)? I am using a TestComplete (for Websites) 2 days and i am not good in this kind of software. Can I ask you for step by step instruction? My textbox name is: textboxAdressIdTemplate14774739400
(this numbers are randomized). What should I do?
Thanks for you time.
Simon
- baxatob8 years agoCommunity Hero
- tristaanogre8 years agoEsteemed Contributor
baxatob is correct so long as the numeric portion is the "random" portion. Usually that's the case but YMMV.
If possible, see if you can find another set of properties that will uniquely identify your object if the name property is that variable. The article that baxatob linked you to should explain how to edit a mapped object, select properties, etc. As has been mentioned MANY times on these forums in various ways, a good NameMapping repository is EXTREMELY important for good automation, no matter how you structure your automation. If your tests cannot find the objects and components because of a poor mapping, then the tests are generally useless. Get those objects mapped well up front and your life will be SOOO much happier.
- AlexKaras8 years agoChampion Level 3
Hi,
> I am using a TestComplete (for Websites) 2 days [...]
In addition to all good advice and readings mentioned previously, I would also recommend the https://support.smartbear.com/screencasts/testcomp
lete/reliable-tests-for-dynamic-objects/ recording (from the https://support.smartbear.com/screencasts/testcomp lete/ page).