03-20-2017 04:50 PM
I have a rookie question: I created two similar keyword tests. In test1 an Object/properties was created for a text field called 'Company Name'. In test2 Name Mapping indicates that a text field called 'Facility Name' was assigned by TestComplete to the same Object/properties as the field in test1 and I already know from past tests that this can cause problems. I can recreate test2 but how do I get TestComplete to create a NEW different Object/properties for 'Facility Name' instead of using the Object/properties for 'Company Name' or maybe I'm looking at this the wrong way? Can someone give me some suggestions.
03-20-2017 11:00 PM - edited 03-20-2017 11:14 PM
First of all Objects and properties are not created by you or test complete. those are created by your developers who wrote AUT.
In testing you or Testcompelte mapp those properties to more manageable/readable Items which call namemappings.
In auto mapping TC will create a name for a object identified (mapped) by one or more properties. The pitfall is when auto mapping properties of two objects could be identical (as you already experienced)
So the best thing is select what object to mapp and do it manually.
So you can avoid unnecessary mappings and select properties unique for particular object.
You can do it as explain hear
obviously it is bit tedious job when you start with a new application.
But in the long run it will pay off.
Correcting mistakes or cleaning up existing mapping is even more difficult.
03-21-2017 11:00 AM
So as a follow up to my initial problem I encountered another problem trying to map the object in test2 manually. Here is what I did.
01) I recreated test2 and stopped the test on the screen where the 'Facility Name' object exists.
02) I clicked on the 'Map Object from Screen' icon and dragged the glyph to the 'Facility Name' field and selected it.
03) The 'Map Object' window displays and it is "mapping" to the same Object as in test1 and I can't edit this info.
04) When I click OK a message stating that The Object is already mapped to NameMapping..........
So I though creating the test2 and mapping the object manually would assign a different "mapping" and allow me to select unique properties/values for that object - but instead TestComplete is still mapping this object to the object in test1? Advise anyone?
03-21-2017 01:52 PM
If you clicked Tools \ option auto-name mapping TC will mapp all objects it encounters at test
so at the beginning you have un-tick it.
now you have two options
1) start with a clean (new) project or
2) Go through name-mapping file find and clear entry of "Facility Name" if incorrectly mapped.