I have this issue with some Win controls. There is a Date DropDowns that I want to access, however both start and end Date identical (todays date), so replay goes to first one -start Date- everytime, both for Start Date and End Date comboboxes.
My question is related to this old post and I see issue in this post still not fixed / answered CodedUI : PropertyNames.ControlName doesn't work
When I spy over comboboxes I see ControlNames are unique so I tried to use control names for the controls , through UIMap.uitest I added ControlName to SearchProperties collection and write the values however now it can not find.
public WinControl UIItem17Ocak2019PerşemDropDown { get { if ((this.mUIItem17Ocak2019PerşemDropDown == null)) { this.mUIItem17Ocak2019PerşemDropDown = new WinControl(this); #region Search Criteria this.mUIItem17Ocak2019PerşemDropDown.SearchProperties[UITestControl.PropertyNames.ControlType] = "DropDown"; this.mUIItem17Ocak2019PerşemDropDown.SearchProperties[UITestControl.PropertyNames.Name] = "17 Ocak 2019 Perşembe"; this.mUIItem17Ocak2019PerşemDropDown.SearchProperties["ControlName"] = "bBasT"; this.mUIItem17Ocak2019PerşemDropDown.WindowTitles.Add("Filtre"); #endregion } return this.mUIItem17Ocak2019PerşemDropDown; } } here is exception I am getting
Message: Test method CodedUITestProject2.KayitTablolari_HurdaListesi.HurdaListesiTabloKontrol threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: TechnologyName: 'MSAA'ControlType: 'DropDown' Name: '17 Ocak 2019 Perşembe' ControlName: 'bBasT' ---System.Runtime.InteropServices.COMException: Bir COM bileşenine yapılan çağrıdan HRESULT E_FAIL hatası döndürüldü. Or is there a way for order of controls in the window? such as "not click first but click second combobox in the window."

WinComboBoxobjects instead ofWinControl. Searchproperty used isWinComboBox.PropertyNames.Name, nothing more.