static void Test(Dtf.Core.IEndpoint endpoint) { // launch app IAppFactory localAppFactory = endpoint.QueryInterface <IAppFactory>(); IApp app = localAppFactory.Create(@"Calc.exe"); app.Launch(); Thread.Sleep(1000); CallbackResourceHandler.Callback = (s) => { return("1845951237"); }; var localCalc = new CalcUi(endpoint); localCalc.Ui.Calculator.One.Invoke(); localCalc.Ui.Calculator.Plus.Invoke(); localCalc.Ui.Calculator.Two.Invoke(); localCalc.Ui.Calculator.Equals.Invoke(); Debug.Assert(localCalc.Ui.Calculator.Result.GetProperty("Name").Replace("Display is ", string.Empty).Trim().Equals("3")); app.Close(); }