0

I have used selenium with python for a while and I recently discovered that my tmp dir is full of rust_mozprofile directories. How can I have them deleted on the fly?

I read in another post that I should use driver.quit() instead of driver.close() but I am already using driver.quit().

DebanjanB
  • 118,661
  • 30
  • 168
  • 217
Laetis
  • 943
  • 2
  • 13
  • 22

1 Answers1

0

As per the discussion Is it Firefox or Geckodriver, which creates “rust_mozprofile” directory rust_mozprofile directories are created by GeckoDriver and Marionette while initiating a new Browsing Context i.e. Firefox Browser session.

Ideally, invoking quit() should delete them all. You can find a detailed discussion in Selenium : How to stop geckodriver process impacting PC memory, without calling driver.quit()?

As an alternate, you can use CCleaner tool to wipe off all the chores before and after the execution of your Test Suite.

DebanjanB
  • 118,661
  • 30
  • 168
  • 217