public static void Execute <T>(this NormalWindowProxy <T> window, ExecuteSymbol <T> symbol, int?timeOut = null) where T : Entity { var entityId = window.EntityId; var button = window.GetOperationButton(symbol.Symbol); window.Element.WaitDataContextChangedAfter( action: () => button.ButtonInvoke(), timeOut: timeOut ?? OperationTimeouts.ExecuteTimeout, actionDescription: () => "Executing {0} from {1}".FormatWith(symbol.Symbol, entityId)); }
public static AutomationElement OperationCapture <T>(this NormalWindowProxy <T> window, OperationSymbol operationSymbol, int?timeOut = null) where T : Entity { var time = timeOut ?? OperationTimeouts.ConstructFromTimeout; var entityId = window.EntityId; var button = window.GetOperationButton(operationSymbol); return(window.Element.CaptureWindow( () => button.ButtonInvoke(), actionDescription: () => "Finding a window after {0} from {1} took more than {2} ms".FormatWith(operationSymbol.Key, entityId, time))); }