Firefox windows don't close after Selenium test has run

Ger picture Ger · Aug 12, 2010 · Viewed 21.1k times · Source

I've been running my selenium tests using selenium rc for about 6 months and suddenly the firefox windows selenium opens do not close when the test is finished.

I am using a specific firefox profile and had not updated my selenium rc jar. I thought that perhaps the latest build of firefox may have been the problem but I reverted back to firefox 2 and the windows still stay open.

I'm running the test on a Windows box.

I've noticed other people seem to be having this problem - just wondering if anyone has a solution?

Thanks, Gearoid.

Answer

jsalvata picture jsalvata · Jun 4, 2012

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.