public static bool IsComboBox(this AutomationElement el) { if (el.Current.ControlType == ControlType.ComboBox) { return(true); } var element = el.GetParent(); var info = element.Current; var type = info.ControlType; if (type == ControlType.ComboBox) { return(true); } return(false); }