4

我无法使用 Firefox (v60.9.0)无头模式生成本地 HTML 文件的屏幕截图

这是我正在使用的命令:

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P AJ --screenshot test.png "file:///C:/html_export.html"

我尝试过使用和不使用配置文件以及文件后使用不同数量的斜杠。命令行中没有错误 - 它只是不生成输出。

当我将 file:// 替换为外部网站时,此命令可以正常工作,例如:

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P AJ --screenshot test.png google.com

它可能与这里提到的重定向错误有关吗?

任何帮助表示赞赏!也许有一种方法可以为 --headless 模式打开输出详细程度?

4

0 回答 0