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().
As per the discussion Is it Firefox or Geckodriver, which creates “rust_mozprofile” directory
rust_mozprofiledirectories 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 os chores before and after the execution of your Test Suite.