Reputation: 21
I am running the TESTNG test in Maven setup . While i am running the testng , I am getting the following exception:
Note: Checked the dependency and there is no error in pom.xml
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'
Upvotes: 2
Views: 2419
Reputation: 193258
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
.
An ideal solution would be to:
driver.quit()
within tearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully. You can find a relevant discussion in:
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
WebDriver is not deleting the profile directory after test exits
Upvotes: 4