There are two ways to do it and I recommend you use both in a hybrid approach.
- Talk to your developers, ask them to stop changing web elements if possible. testComplete is a record and play tool, like its cousin Selenium IDE, the way testComplete maps its elements is very structure-dependent, which means if there is any slight change in web element structure, testComplete will complain about it and your test cases will break. The way to keep it from happening is to keep web element structure as it is.
- Use more JavaScript, less record and play. Instead of relying on testComplete to locate a web element, you can use JavaScript to locate a web element via css selector or xpath. You will notice css and xpath are less structure dependent, which means your tests will be more stable.
The hybrid approach is that you should talk to your developers first, telling them that they should be aware any change they make will impact your test cases. Then, refactor your test cases using JavaScript.
It will be a long and even painful road to maintain automated GUI test cases, so you will have to take one step at a time.