public static AutomationElement ButtonInvokeCaptureChild(this AutomationElement button, Func <string> actionDescription = null, int?timeOut = null) { return(button.CaptureChildWindow(() => button.ButtonInvoke(), actionDescription, timeOut)); }