Using CloseBroswer(), it only close browser but Still chromeDriver is not killed. How to killed Chrome driver

Create a custom keyword as below and call it either at end or at the beginning of the test case.
This will kill all instances of chrome.exe and chrome driver.exe

public class killProcess{

@Keyword

def killProcess() {
Runtime.getRuntime().exec(“taskkill /im chromedriver.exe /f”)
Runtime.getRuntime().exec(“taskkill /im chrome.exe /f”)
}
}

4 Likes