AutomationElement labeler1; object labelerNoDefault = autoElement.GetCurrentPropertyValue(AutomationElement.LabeledByProperty, true); if (labelerNoDefault == AutomationElement.NotSupported) { // TODO Handle the case where you do not wish to proceed using the default value. } else { labeler1 = labelerNoDefault as AutomationElement; }