public string GetAttribute(string attributeName) { PropertyInfo property = this.AutomationElement.Current.GetType().GetRuntimeProperty(attributeName); object value = property.GetValue(this.AutomationElement.Current); return value.ToString(); }