Originally posted by HirendraSingh on April 13, 2026
Is there any way that TestComplete will map the object automatically with ID instead of other criteria as even though the object has a unique id but most of the time TestComplete maps it automatically with other criteria like value, class, type as below.
I want to map with ID then with name if that is available as due to above mapping structure most of the time other button also get mapped under same type or class.
As you can see below xpath with id already there for button display data but it has mapped with value and type which causes object not found issue or performance issues.
//*[@id=“ctl00_MainContent_btnShowData_input”]
I created a mini architecture to do basically the same thing as NameMapping, but more efficiently and faster. The heart of this architecture is a collection of “locators”. Each locator.js file (ex : admin.js, homePage.js) has this structure :
then, a resolution engine check if the key exist (ADMIN.PANEL.EMAIL). if yes, it check its “mode” (xpath, or css, or anything we want.) and get the associated xpath, to be used in the standard functions (click, set etc…)
Originally posted by HirendraSingh on April 13, 2026
I am also editing the xpath manually most of the time that is why I am asking this question that if there is any way we can directly map ids first. Also can you give me some example how do you created the mini framework as I am having multiple projects and multiple team members to manage automation, so that will be helpful.
Dynamic looking ID such as “ctl00_btnShowData”, TestComplete may decide that it’s auto generated or may change between runs and therefore not reliable. So it avoids using it, and instead chooses alternative selectors it considers more stable.
Is there logic on how TC decides what a dynamic-looking ID or auto is generated? We are creating IDs for the web and storing them so they remain consistent, but we have issues with recognizing these IDs.
Can we obtain the logic/algorithm for making them recognizable for TC, so we don’t have problems with recognizing IDs?
I don’t believe SmartBear publicly shares its underlying logic or algorithms. However, the available documentation provides sufficient information for practical use.