Firefox windows don't close after Selenium test has run
My solution was to use driver.quit()
(this will auto close the Firefox browser) instead of driver.close()
- even though there was only one Firefox window open, AFAIK.
Very simple solution in the end - just called SeleniumTestCase's tearDown() method (ie. we call super.tearDown(); from our base test class)
That closes down all the browser windows successfully.
We had this problem and after some investigation we fixed it.
In Selenium RC you have the file "grid_configuration.yml" where you have the list of browsers and their respective identifier, for instance "*firefox". Depending of your environment when you execute "firefox" you'll be probably calling a wrapper, an alias or a symbolic link of the firefox executable file. When Selenium is launched, it creates some fork process for the browser and depending if you are calling the firefox executable file directly or a wrapper, the creation of these process is different and when it tries to kill the process in the tearDown() it actually kills the child process and keep the father alive, so the tearDown() doesn't close the browser.
The solution is edit the "grid_configuration.yml" file changing "*firefox" for the absolute path of the browser executable file (always with * at the beginning)