/// <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); }