public static SimpleCalculatorApp Launch(string file = null) { if (string.IsNullOrWhiteSpace(file)) { file = @"D:\Work\Repos\BastaVsEnterprise\TestautomationDemo\SimpleCalculatorWpf\bin\Debug\SimpleCalculatorWpf.exe"; } var app = new SimpleCalculatorApp(); app.Start(file); return app; }
public static SimpleCalculatorApp Launch(string file = null) { if (string.IsNullOrWhiteSpace(file)) { var location = Assembly.GetExecutingAssembly().Location; var basePath = location.Substring(0, location.IndexOf(@"\Demo-CodedUI\") + 14); file = basePath + @"SimpleCalculatorWpf\bin\Debug\SimpleCalculatorWpf.exe"; } var app = new SimpleCalculatorApp(); app.Start(file); return(app); }