Can anyone help me to delete the temporary files generated during the web driver test runs? i am using selenium web driver 1.25 and IE 7.Implementing my test in java.
You can make the download folder shared. \youruser\downloads after that you can pass this path to the File. Delete(); and it will delete the desired files.
Step 1: Press Windows key + R to open the Run command. Then type “%temp%” in the search field and press OK. Step 2: Now, select all local temp files using ctrl + A and then press delete.
Enter %temp% from Search/Run, and delete what's in there. Also empty the Recycle Bin. Alternatively, use a command line command. Save rd %temp% /s /q in a text file with the .
Be sure you call
driver.quit();
instead of
driver.close();
close() will not delete temporary files
The temporary files are deleted automatically once you had used driver.quit() in the latest versions of Webdriver. Can't be sure. Is it 1.25 or 2.25 ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With