public string[] GetNewFileComboBoxItems() { var dialog = DialogHelpers.GetOpenDialog(GetMainWindowHWnd(), GenerateTypeDialogID); var createNewFileComboBox = dialog.FindDescendantByAutomationId("CreateNewFileComboBox"); createNewFileComboBox.Expand(); var children = createNewFileComboBox.FindDescendantsByClass("ListBoxItem"); createNewFileComboBox.Collapse(); return(children.Cast <AutomationElement>().Select(element => element.Current.Name).ToArray()); }