4

I am using Selenium 2.35.0 to access web pages in a loop by calling chromedriver_win32_2.3/chromedriver.exe. Sometimes an exception would happen (Time out etc.) and something would create a lot of scoped_dir**_ folders and gradually filling up the disk space.

The strange thing is even if I reboot the computer, the writing continues after restart. The only way to stop this is to delete the user account.

I looked at the running processes and could not find anything unusual.
Any explanation on why this happens?

4
  • 1
    There was similar issue for firefox here : stackoverflow.com/questions/6787095/… . Commented Sep 9, 2013 at 8:26
  • Madusudanan: I looked through the link you provided, the problem seems to be different. A potentially useful part is to delete the temporary files in case the WebDriver cannot start. However, it does work in my case. Commented Sep 23, 2013 at 16:14
  • The scoped dir is the counterpart of firefox's anonymous webdriver profile folders.They are created by chromedriver,the issue seems to be still open, See-> code.google.com/p/selenium/issues/detail?id=1934. I have faced this similar issue and as of now I am clearing the temp files manually.Perhaps you could try not closing your browser and use clear cookies functionality that comes with webdriver for each browser.Spawning a new browser creates many temp folders like that. Commented Sep 24, 2013 at 7:04
  • I have the same problem on one of my selenium grid machines. I updated the chromedriver.exe to version 2.4 and now the scoped_dir** files/folders seem to get deleted after both successfull and failed tests. Commented Oct 29, 2013 at 10:00

2 Answers 2

3

This is a bug in chromedriver that has been fixed and resurfaced several times. It will be fixed again in Chromedriver 2.30 which hasn't been released yet.

Sign up to request clarification or add additional context in comments.

Comments

3

I came across this question trying to solve my own problem. This is what worked for me. I am using instance of my ScrapeTest class. in my class definition I have the following destructor,

def __del__(self): """ close webdriver """ self.driver.close() self.driver.quit() 

Even though the destructor get called after each run, it was not working until I use del to delete my scraper instance explicitly.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.