public AutomationElement FindItemByProperty(AutomationElement startAfter, PropertyId property, object value) { var foundNativeElement = NativePattern.FindItemByProperty( startAfter == null ? null : AutomationElementConverter.ToNative(startAfter), property == null ? null : UIA.AutomationProperty.LookupById(property.Id), ValueConverter.ToNative(value)); return(AutomationElementConverter.NativeToManaged((UIA2Automation)BasicAutomationElement.Automation, foundNativeElement)); }
public AutomationElement FindItemByProperty(AutomationElement startAfter, PropertyId property, object value) { var foundNativeElement = Com.Call(() => NativePattern.FindItemByProperty( startAfter?.ToNative(), property?.Id ?? 0, ValueConverter.ToNative(value))); return(AutomationElementConverter.NativeToManaged((UIA3Automation)FrameworkAutomationElement.Automation, foundNativeElement)); }
public AutomationElement FindItemByProperty(AutomationElement startAfter, PropertyId property, object value) { var foundNativeElement = ComCallWrapper.Call(() => NativePattern.FindItemByProperty( startAfter == null ? null : ValueConverter.ToNative(startAfter), property == null ? 0 : property.Id, ValueConverter.ToNative(value))); return(ValueConverter.NativeToManaged((UIA3Automation)BasicAutomationElement.Automation, foundNativeElement)); }