/// <summary> /// 清空执行环境状态数据 /// </summary> public void cleanUp() { string message = string.Empty; if (_WebDriver == null) { return; } clearAllCookies(); try { _WebDriver.Quit(); } catch (Exception ex) { message = string.Format("Exit webdriver faild,error message<{0}>.", ex.Message); _SystemLog.writeLog2Console(LOG_LEVEL.ERR, message); } try { _WebDriver.Dispose(); } catch (Exception ex) { message = string.Format("Dispose webdriver faild,error message<{0}>.", ex.Message); _SystemLog.writeLog2Console(LOG_LEVEL.ERR, message); } _WebDriver = null; CPublic.killProcess(PhantomjsDriverProcessId); }
public void TestCleanUp() { #region Code Injection for (int i = 0; i < unifiedLogCollection.Count; i++) { if (unifiedLogCollection[i] != null) { unifiedReport.EndTest(unifiedLogCollection[i]); unifiedReport.Flush(); unifiedLogCollection[i] = null; } } unifiedLogCollection.Clear(); //WiniumDriver.WiniumFinalise(); driver.Dispose(); ClearBrowser(); #endregion }
public void TestCleanUp() { #region Code Injection for (int i = 0; i < customLogCollection.Count; i++) { if (customLogCollection[i] != null) { customReport.EndTest(customLogCollection[i]); customReport.Flush(); customLogCollection[i] = null; } } customLogCollection.Clear(); WiniumDriver.WiniumFinalise(); driver.Dispose(); ClearBrowser(); #endregion }