Same application on different OS giving different object spy results
- 6 years ago
Hmm, those two mappings aren't even looking at the same properties to identify them. I'm not sure the 64bit property will even manage to find the button correctly. Pointing to just the CLrFullClassName as control probably just brings back one of the child controls. What if your grid contains more than one control ? What if your button is actually an item inside that 64bit control ? That means the 32bit property finds an actual button, but the 64bit one just finds a "control" which is located in the same place, but isn't the actual button. The most likely resolution would be to open object browser for the button in a 32 bit environment and take note of those properties. Then open the same button in the 64 bit environment and take note of that. You will be able to identify something that's almost the same (or with luck identical) eg. NativeClrObject.Name is button10 in 32bit is button10x64 in 64 bit (just examples pulled from thin air) Now, get rid of the 64bit one which is just a control and change the 32 bit one to NativeClrObject.Name "button10*" Your KWTs and scripts can now always refer to that mapped object no matter the OS. TC will be able to figure out what exactly the button is called no matter what OS. Now to your question :
Is it possible TC will do this again ? Yes, definitely. You are always going to have to tweak the mapping properties for your objects. Fortunately once it's done, you shouldn't have to review this unless the developers rename buttons or move them about. Some general things you should consider.
Creating a KWT from recording is a good starting point, but don't rely on it to do your mappings and tests. It's best to turn off automatic mappings and manualy do it before you start recording tests
Turn off
so TC won't create these unwanted objects while you are working.