If you want to reliably interact with the control using recorded tests, you need to specify the name or identifier of the control. Without names, your test will rely on an instance property, which, as you have noticed, depends on the location of the unnamed control in relation to other unnamed controls.
If your application is very static, you can get away with missing names, but moving the controls can cause it to crash. You will also encounter problems with controls that load dynamically because they can cause the values ββof the instance to change, and your recorded actions may occur if the controls are mismanaged.
Donβt get me wrong, you can write CodedUI tests for applications without control names, it will just be a serious point of pain, and the records will be unreliable.
source share