public AppDriver(string args, int timeoutMs) { _proc = Process.Start(ExePath, args); _app = new WindowsAppFriend(_proc); _mainWindowDriver = new MainWindowDriver(_app.Type <System.Windows.Application>().Current.MainWindow); WPFStandardControls_3.Injection(_app); WPFStandardControls_3_5.Injection(_app); WPFStandardControls_4.Injection(_app); WindowsAppExpander.LoadAssembly(_app, GetType().Assembly); _killer = new Killer(timeoutMs, _proc); }
public AppDriver() { if (Process != null) { return; } var dir = Path.GetFullPath("../../../WpfApplication/bin/Release"); var pathExe = dir + "/WpfApplication.exe"; var info = new ProcessStartInfo(pathExe) { WorkingDirectory = dir }; Process = Process.Start(pathExe); _app = new WindowsAppFriend(Process); WPFStandardControls_4.Injection(_app); WindowsAppExpander.LoadAssembly(_app, GetType().Assembly); }