【问题标题】:org.openqa.selenium.WebDriverException: There is not enough space on the disk error using Selenium and WebDriver through Javaorg.openqa.selenium.WebDriverException: There is not enough space on the disk error using Selenium and WebDriver through Java
【发布时间】:2019-08-22 11:55:47
【问题描述】:

我正在 Maven 设置中运行 TESTNG 测试。在运行 testng 时,出现以下异常:

注意:检查依赖,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'

【问题讨论】:

  • 您对“磁盘空间不足”有什么看法?

标签: selenium selenium-webdriver webdriver space diskspace


【解决方案1】:

此错误消息...

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'

...暗示 WebDriver 实例无法启动/生成新的 WebBrowser 会话,因为空间不足


如果您仔细查看 GeckoDriver 启动日志,您可以观察到 rust_mozprofile 的创建如下:

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"

此日志清楚地表明,每次 GeckoDriver 启动新的 Firefox 网络浏览会话时,都会为 Marionette 指定一个新的配置文件,即 C:\\Users\\Debanjan.B\\AppData\\Local\\Temp\\rust_mozprofile.7diW2pWdtxN9 .在成功的 quit() 上,此临时 rust_mozprofile 将被删除。

您可以在以下位置找到一些相关讨论:

如果您没有调用quit(),则..\AppData\Local\Temp 目录可能会被stale rust_mozprofiles 填满。


解决方案

理想的解决方案是:


附加说明

错误...磁盘上没有足够的空间... 可能不是因为看起来存储容量用完而引起的,但也可能是由于用完i-nodes 在文件系统上。

你可以在No space left on device – running out of Inodes找到详细的文档


结尾

WebDriver is not deleting the profile directory after test exits

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-09
    相关资源
    最近更新 更多