Just got done recording a script test for a .Net app in TestComplete 8.5. In one area of my test, there are two dateTextBoxes. After running the test, it would not enter the date into the second field. Upon further investigation, I discovered that both fields were mapped under the same name. Has this happened to anyone else? How can I edit the second field to change the mapping name, or re-map it? (Just for clarity, both fields are mapped as Alias.xxx.xxx.xxx.datePickerTextBox).
What you'll need to do is edit the existing NameMapping item to add additional criteria so that it only identifies one of the two fields. Perhaps adding the caption property, if it's web adding "innerText" property, something like that.
Once you have the NameMapping set up so it's only picking up one of the two datePickerTextBox objects, then you can remap the OTHER one, making sure to use the same set of criteria so that it is identified uniquely.
BTW, LOVE the term "Shiznit"... very descriptive. :-)
I delted the mapping, and then created a new mapping. Mapped the first date field, and then using object spy, I got the name of the second date field. Same stuff. The date fields are actually composed of 2 objects: datePicker and timePicker - together they are under a parent node of varDateTimePicker. So, there are two varDateTimePicker parent objects. Object spy wants to name the second parent object as the same. I may just scratch it, and re-record...
Are you just using the mapping as given you by TestComplete or are you doing your own modifications? The reason I ask is that TestComplete has some built in algorithms to determine which properties to use in the mapping and, sometimes, those properties are not necessarily, always, the ones that will give a unique mapping. What this means is that after you initially map an object, you may have to do some manual edits of the object to add additional properties.
Check out the following article for the "how" stuff.