Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

241
Views
Python Selenium flooding temp directory, need to close selenium session without closing the browser

I'm using selenium in a python script to launch a Firefox browser that's using a js code as an extension for checking some data on a website and alerts me when the data changes.

The js code is responsible for closing the browser window after certain time. Everything works smoothly, the only problem is that because the js extension is closing the browser, the temp files of the Selenium webdriver won't delete. I need to delete the temp folder every day manually because of that temp files flooding.

Is there any way to close the webdriver session without terminating the browser session? I need to keep the browser that Selenium have opened but close the Selenium properly so it will delete all of the temp files. I've read about a detach method in Selenium but it's not working for me. (I've seen some users saying that's it's not working at all in another discussion on the forum)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!