After dropdown is expended how can I select an option from the dropdown which is in span
image of the expanded dropdown https://prnt.sc/k-rFIUa6Ixeo
HTML:
<span class="ant-select-selection-item" title="Mrs.">Mrs.</span>
C# code where dropdown is expended
WebElement dropDown = (WebElement)Driver.Instance.FindElement(By.XPath("//*[@id=\"root\"]/main/section/form/div/div[1]/div[1]/div[1]/div/div/div"));
dropDown.Click();
Note that title is changing in span element after another option is selected so if we select first option title is Mr.
<span class="ant-select-selection-item" title="Mr.">Mr.</span>
short gif for better visual: https://gyazo.com/8093ced6107599ee7540490d4fba0cc2
Also hovering over dropdown options in the hmtl code above aria-activedescendant property is changing so for the option "MR" property is "rc_select_0_list_0", for option "Mrs" property is "rc_select_0_list_2" and so on,
for more details here is short gif https://gyazo.com/827fc0c4e1265b842301c87da6539e0c