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)