This error message...
org.openqa.selenium.WebDriverException: There is not enough space on the disk
Command duration or timeout: 914 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
...implies that the WebDriver instance was unable to initiate/spawn a new WebBrowser session as there was not enough space.
If you take a closer look at the GeckoDriver startup logs you can observe the creation of rust_mozprofile
as follows:
1566480787996 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\Debanjan.B\\AppData\\Local\\Temp\\rust_mozprofile.7diW2pWdtxN9"
This log clearly indicates that a new profile i.e. C:\\Users\\Debanjan.B\\AppData\\Local\\Temp\\rust_mozprofile.7diW2pWdtxN9
is scoped out for Marionette everytime GeckoDriver initiates a new Firefox web browsing session. On a successful quit()
this temporary rust_mozprofile gets deleted.
You can find a couple of relevant discussions in:
If you weren't invoking quit()
there is a possibility of ..\AppData\Local\Temp
directory may get filled up with stale rust_mozprofiles
.
Solution
An ideal solution would be to:
- Always invoke
driver.quit()
within tearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully. You can find a relevant discussion in:
- (WindowsOS only) Use CCleaner tool to wipe off all the OS chores before and after the execution of your Test Suite.
- (LinuxOS only) Free Up and Release the Unused/Cached Memory in Ubuntu/Linux Mint before and after the execution of your Test Suite.
Additional Notes
The error ...there is not enough space on the disk... may not necessary be caused by running out of storage capacity apparently as it seems but can also happen due to running out of i-nodes
on the filesystem.
You can find a detailed documentation in No space left on device – running out of Inodes
Outro
WebDriver is not deleting the profile directory after test exits