public void Dispose() { if (_app != null) { _app.Close(); } }
public void TestCleanup() { if (testContextInstance.CurrentTestOutcome != UnitTestOutcome.Passed) { testApp.Close(); } }
public void TestCleanup() { // If test failed, then close the app. The next test will restart it if (testContextInstance.CurrentTestOutcome != UnitTestOutcome.Passed) { testApp.Close(); } }
public static void ClassCleanup() { // Close the app after all tests are finished Playback.Initialize(); try { Process[] processes = Process.GetProcessesByName(TestProcess); foreach (Process process in processes) { ApplicationUnderTest app = ApplicationUnderTest.FromProcess(process); app.Close(); } } finally { Playback.Cleanup(); } }
/// <summary> /// 关闭测试用的UI进程 /// </summary> public void CloseApp(ApplicationUnderTest app) { try { app.Close(); } catch { } if (!app.WaitForControlNotExist(5000)) { try { app.Process.Kill(); } catch { } } }
/// <summary> /// Dispose the dependent objects of data import job /// </summary> protected virtual void Dispose(bool disposing) { if (disposing) { Playback.PlaybackError -= OnPlaybackError; if (!ReuseExistingApplicationUnderTest) { if (_applicationUnderTest != null) { _applicationUnderTest.Close(); _applicationUnderTest.Dispose(); } else if (ApplicationUnderTestProcess != null) { ApplicationUnderTestProcess.CloseAllInstances(); } } _applicationUnderTest = null; ApplicationUnderTestProcess = null; } }
/// <summary> /// Cleans up. /// </summary> public static void CleanUp() { _cache.Clear(); _root = null; _aut.Close(); }
public void MyTestCleanup() { App.Close(); }
public void MyTestCleanup() { _uut.Close(); }
public void MyTestCleanup() { // To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items. _app.Close(); }
public void MyTestCleanup() { appToTest.Close(); }
public void MyTestCleanup() { test.Close(); }
public void AfterScenario() { //TODO: implement logic that has to run after executing each scenario _app.Close(); }
public void MyTestCleanup() { calc_.Close(); }