//Shut down RC server private void shutDownServer() { try { if (seleniumInstance != null) { seleniumInstance.Stop(); seleniumInstance.ShutDownSeleniumServer(); } System.Diagnostics.Process[] allProcess = System.Diagnostics.Process.GetProcessesByName("java"); if (allProcess.Length != 0) { for (int i = 0; i < allProcess.Length; i++) { allProcess[i].Kill(); } } } catch (SeleniumException e) { Exception friendlyEx = new Exception("Selenium sever shut down failed.", e); throw friendlyEx; } }