Current implementation makes an extra getWindowHandles call every time the code executes Selenium::WebDriver::Driver#close