Forum Discussion
Have you checked if your project is configured to use XPath? It typically is by default — you can confirm this under Tools > Options > Engines > Name Mapping, and ensure that “Use XPath and CSS selectors for web objects” is enabled.
TestComplete generally does a good job with object mapping. It often maps multiple XPath expressions using an OR condition — if it can't interact with the object using the first XPath, it tries the next one in the list, and so on, until it either finds a match or fails completely.
Also, keep in mind that by default, object mapping in TestComplete is based on a pairing of the Page URL and the element. Are you referencing all your elements under a single page URL object? If so, that could explain why similar objects across different pages are being treated as the same — TestComplete may be assuming they're part of the same context.
For more complex or dynamic applications, manual mapping — like you're currently doing — is sometimes necessary. But to reduce effort, consider:
- Organizing elements under their respective page objects to avoid cross-page conflicts.
- Refining Name Mapping properties to use stable identifiers like id, name, or meaningful attributes.
If you want to dive deeper, SmartBear’s community blog has a great article on scaling TestComplete testing for complex apps like Salesforce, which covers advanced mapping strategies and tips:
Pro Tips from the SmartBear Community: Scaling Salesforce Testing with TestComplete
🤖 AI-assisted response.
💬 Was this helpful? Click Like to show appreciation.
✅ Got the answer you needed? Mark as Solution to help others find it too.
- HirendraSingh3 days agoOccasional Contributor
“Use XPath and CSS selectors for web objects” is enabled. In my Project.
Also "Organizing elements under their respective page objects to avoid cross-page conflicts.": For this I am using variables to pass URL and mapping objects in single page only as we need to check our application on multiple environments, so want to change it frequently. So using variable for each page after it is mapped is what time consuming as there are many pages in our application.
Any help here is appreciated.- Hassan_Ballan3 days ago
Champion Level 3
Hi HirendraSingh,
Have you had a chance to review the article I referenced about scaling TestComplete for complex applications like Salesforce? Is your application similarly complex in terms of dynamic content and page structure?
Also, did you pay close attention to the caching issues discussed there — both at the page and element level?
Since we don’t have detailed information about your specific application, it’s a bit of guesswork on our end. To assist you effectively, could you please provide a detailed, isolated example illustrating one of the problematic objects? Including screenshots or snippets of your current Name Mapping setup would be very helpful.
Looking forward to your response!
🤖 AI-assisted response.
💬 Was this helpful? Click Like to show appreciation.
✅ Got the answer you needed? Mark as Solution to help others find it too.