2 Root name mapping nodes and mapped item copies created for tested website
I am having an issue with namemapped items when running TestComplete keyword tests.
Items are returned as not existing and I have to remap the items.
NOTE 1: I have looked already at dynamically generated values in relation to objects and am using wildcards to filter out what I have identified as the variable portion of the dynamic ids.
I have noticed the following in relation to this issue for my mapped application and the namemapped items.
1) There are 2 Root/Parent nodes under the namemapping editor for my testsite. Anyone know why this would happen? My test site URL is not changing, at least not what is displayed in the address bar, so I don't understand why I have 2 Root nodes for the same website in the namemapping editor.
2) Due to issue 1 above, what I am noticing is that when I run my keyword tests they may run fine a number of times (I generally do 3 runs after creation and debugging the tests to ensure they run correctly) but when I run a test that hasn't been run for some time (maybe a week between runs) suddenly many objects can no longer be found.
When I remap the objects it tends to be the case that failed object is found under the "other" root/parent node in the namemapping editor.
NOTE 2: I have ended up re-mapping many objects due to previous "not found" issues. Therefore most objects I'm examining now have 2 mappings, 1 under each of the separate parent nodes.
Parent/Root nodes: Parent1, Parent2
So the same object (in my example a button)ends up being identified and mapped under 2 different Parents. The path from the parent to the final child object is also usually different in some part e.g. "....panel2..." above for Parent2
My main questions are:
1)Why is the namemapping creating 2 separate nodes when my website URL does not change?
2) why after multiple successful test runs can the object suddenly not be found.
3) why the apparent switch in the namemapping identification from one Parent/Root to another between test runs?
Apologies for the long description, trying to communicate my issue as clearly as I can.
Just want to verify something... the problem we're trying to figure out is why the same page is showing up in your namemapping twice. Is this correct?
If so, based upon the mapping criteria you have shown with the properties, etc... they are the same page... so, there are two explanations I can give for this.
1) Someone deliberately mapped the same page twice, possibly unknowingly. In my current employment, this has happened where two people are working on similar automation work and are not aware of what the other person is doing. So, they end up mapping the same item twice but with different names. The name that you are seeing (pageAssuranceSimplified and pageRedFlareSimplifyingAssurance) is something that someone entered when they were doing the mapping.
2) If you were recording a test case, there was some sort of situation where TestComplete did not recognize that the page had already been mapped. Perhaps the page title was different in your development. Perhaps there is some other criteria on the page that is different. In any case, the initial recognition determined that it was a different page than what was mapped.
Delete one. :-) If you don't need to have both pages, then you can easily delete one. Now, this may be a bit more complicated than what it seems as you may need to make sure that the one you decide to keep has all your necessary mapped components. You can drag child objects from one node to another in your mapping to build your final object before you delete.