chromedriver.exe not being disposed when "Close All Browsers"

879 views
Skip to first unread message

Juan T.

unread,
Jul 23, 2014, 6:43:46 AM7/23/14
to robotframe...@googlegroups.com
Hi,

I'm running RobotFramework 2.8.3 with Selenium Chrome Driver 2.9 on Windows 2008

ChromeDriver.exe is not being disposed from the Task Manager when the Test Case raises exception.

Obviously I'm using:    Test Teardown     Close All Browsers     which is meant to close any existing browser and driver connection.


Is anybody going through the same issue? Any solution apart from killing "chromedriver.exe" from command line?



I had a look to the Python - Selenium keyword implementation and looks correct:
    
browsermanagement.py
def close_all_browsers(self):
        """Closes all open browsers and resets the browser cache.

        After this keyword new indexes returned from `Open Browser` keyword
        are reset to 1.

        This keyword should be used in test or suite teardown to make sure
        all browsers are closed.
        """
        self._debug('Closing all browsers')
        self._cache.close_all()

browsercache.py
def close_all(self):
        for browser in self._connections:
            if browser not in self._closed:
                browser.quit()
        self.empty_cache()
        return self.current

webdriver.py
def quit(self):
        """
        Closes the browser and shuts down the ChromeDriver executable
        that is started when starting the ChromeDriver
        """
        try:
            RemoteWebDriver.quit(self)
        except:
            # We don't care about the message because something probably has gone wrong
            pass
        finally:
            self.service.stop()




Thanks.

I appreciate it.

Ss Raghavan

unread,
Aug 16, 2014, 12:07:18 PM8/16/14
to robotframe...@googlegroups.com
Both driver and browser are two different entities. So closing the browser doesn't mean exiting the driver. So to get the handle back to quit command before close browser use a min of 3 sec delay and see if your chrome driver is killed
Reply all
Reply to author
Forward
0 new messages