如何为无头镀铬设置超时

时间:2017-11-10 10:07:13

标签: macos google-chrome-headless

我试试:

chrome --timeout 15000 .....

如果铬在15秒内没有完成,它应该立即完成。

但是当我跑步时

chrome --headless --disable-gpu --timeout 30000 --dump-dom http://example.com

我得到了

  

[1110 / 120048.838007:错误:headless_shell.cc(603)]打开多个标签   仅在启用远程调试时支持。

它没有 - 超时标志

Chrome Canary v64 OSX

3 个答案:

答案 0 :(得分:0)

尝试使用chrome --headless --disable-gpu —-timeout=30000 --dump-dom http://example.com

答案 1 :(得分:0)

您需要将--timeout标志放置在--headless标志之前

chrome --timeout 30000 --headless --disable-gpu --dump-dom http://example.com

答案 2 :(得分:0)

仅在 macOS 上使用 =

chrome --timeout=30000 --headless --disable-gpu --dump-dom http://example.com
相关问题