Name Mapping problem with TC9 on Vista
I have the following Name Mapping (NM) problem in TC9.20 that is driving me bonkers. I have successfully used NM for years with this VB application. The same scripts in question work fine on Windows-7 and Windows-XP but fail on Windows-Vista.
Below you will see the NM and Aliases for a VB6 Combo Box (drop down list box) that contains 1 to n items (at the time of the test there are 3 items). Below that are the properties used to identify the object.
WndClass = ThunderRT6ComboBox
Parent.Parent.WndCaption = Change User Password
Name = VBObject("Combo1")
Now, if I start the application and go to the object in the application; and the alias in TC9, click “Highlight on Screen” it highlights the correct object, thus I think all is good and the script will run. BUT it does not; it fails with ‘…object does not exist…’. Now I go back to the NM tab and the alias object and click “Highlight on Screen”, TC9 reports, “The underlying object does not exist”. Now, if I remove the property “Name = VBObject("Combo1")” and click “Highlight on Screen” the correct object is highlighted but having only two simple properties is not wise so I double click on the alias to edit the NM and now the Name property has the value of ‘Window("ThunderRT6ComboBox", "", 1)’ and the test runs, once. If I restart the application the script will not run and the Name value is back to ‘VBObject("Combo1")’. I cannot win.
Once I open the application the NM object values are ‘X1’ but if I run TC9 the NM objects values are ‘X2’, this is driving me mad and it is a short drive for me.
Any pointers would help.
Bruce M. Dejaiffe
Is this the only issue you are experiencing, or is this just one example of a number of similar problems?
The fact that it is dropping the naming scheme from a recognized VB object back down to a generic window would lead me to believe there may be some issue with TC recognizing the control as a VB object. Try using the Object Browser to look at the control in the state it is in when the Name Mapping is failing. Check to see if it has the normal properties that TC creates for VB controls (such as NativeVBObject).
Thanks, I believe this is the only problem I’m having that this time, but all the scripts ran in TC5 - 8 without any changes. Is what you’re saying is maybe TC9 is not configured to find VB objects? I did verify that in the properties of the project I have (Open Application, General (the list of priority of objects) that NativeVBObject is first in the list. Is there another setting that I’m missing?
Although that was a good idea to make sure the settings are correct, what I was actually suggesting is that you check in the Object Browser to see the current state of the combo box as TestComplete sees it at the time you are getting the error.
When you get the error, leave the application you are testing in its current state. Then, in TestComplete, open the Object Browser and walk down the object tree to the combo box in question. Take a look at the combo box to see if it has the characteristics described in the help doc at Accessing Native Properties and Methods of Visual Basic Objects. Make sure the object browser is in the Advanced View mode.
Also, have you tried running the test on multiple WinVista machines, or are all the failures on the same machine?