Forum Discussion
Are you able to provide the exact URL you are having issues with? The example you have provided "http://www.google.com/page/*" is very vague.
Also, have a look at Name Mapping - Conditional Mapping Criteria
Below is the different url of different pages and I am using https://int-apps.tuvsud.com/GCN/Pages/* in Project variable so that all the objects will map under single page.
https://int-apps.tuvsud.com/GCN/Pages/Default
https://int-apps.tuvsud.com/GCN/Pages/List
https://int-apps.tuvsud.com/GCN/Pages/Probation
- rraghvani1 month ago
Champion Level 3
This example is based on the website https://www.w3schools.com. I've built the name mapping hierarchy structure shown below.
URL https://www.w3schools.com/css/default.asp
URL https://www.w3schools.com/html/default.asp
Though both pages contain a Title and two buttons "< Home" and "Next >". They belong to different pages of the hierarchy - you have to create individual components so that they have unique relationships between parent and child.
You can modify the hierarchy structure of Aliases, so that you can access the components like so
Aliases.pageCssTutorial.linkHome Aliases.pageCssTutorial.linkNext Aliases.pageJavascriptTutorial.textnodeTitleIf the domain name changes https://www.uat-w3schools.com or https://www.reg-w3schools.com then I can use wildcard to replace uat or reg with "*" so it becomes https://www.*-w3schools.com.
It's vital the get the name mapping structure correct, for TestComplete to identify the correct objects. Each child object, must have a parent object.
- HirendraSingh1 month agoContributor
So, you mean to say first I will map all the pages and then I will replace its url with wildcards in name mapping, so in my case it can be as below. Also does this wildcard work in constant mode also like shown in SS.
https://*-apps.tuvsud.com/GCN/Pages/Default
https://*-apps.tuvsud.com/GCN/Pages/List
https://*-apps.tuvsud.com/GCN/Pages/Probation
- rraghvani1 month ago
Champion Level 3
I revisited an old TestComplete project where I had reworked my name mappings a few years ago and introduced this hierarchical structure.
Using an INI file, using Storages.INI to set the variableFor the web application, I used conditional mapping criteria to handle both authenticated and non-authenticated scenarios, along with wildcards to support different environments such as "uat" and "reg".
Conditional and wildcard name mapping used for the URLEach panel in the hierarchy represents a specific webpage within the application.
The wildcard used at the beginning is for the URL domain, and the wildcard used at the end is for the SchemeID. For example,http://als.uat.nonauth.internal.smartbear.com/Administration/AddAssetRecalibration/5
Whereas the wildcard at the beginning here, is used for the SchemeID. For example,http://als.uat.nonauth.internal.smartbear.com/5/Implementation/AddScheme
Within the project suite, the "Benchmarking" project corresponds to a separate page that I was testing. I defined a panel called panelBenchmarking, which contains only the name mappings for the objects I interact with on that page.
I organise Aliases, so that I don't have to use long names when referencing an object.I found this structure to be very effective. The only changes required for different environments - such as database configuration, usernames, and passwords - were handled through updates to the INI file. This avoided the need to frequently check files in and out of TestComplete.
I applied this approach across multiple projects. However, over time, maintaining name mappings became increasingly difficult, especially when updates were required across all projects due to feature changes. Since name mappings are project specific and cannot be shared, this created significant overhead.
Eventually, I decided to remove name mappings altogether and switched to using the Find method instead.
This should give you a clear idea of how to structure your name mappings effectively and resolve your issue.