当我尝试运行时:
google-chrome --headless --disable-gpu --repl http://google.com
变得无限:
[0829/155519.758686:INFO:headless_shell.cc(303)] Type a Javascript expression to evaluate or "quit" to exit.
>>> {"result":{"type":"undefined"}}
>>> {"result":{"type":"undefined"}}
>>> {"result":{"type":"undefined"}}
>>> {"result":{"type":"undefined"}}
...
Ubuntu 16.04 上的 Google Chrome 60.0.3112.113
这是 Chrome 中的错误吗?
最佳答案
直接使用二进制文件/opt/google/chrome/chrome 而不是 google-chrome,它指向 bash 脚本/usr/bin/google-chrome。
摘自评论
https://developers.google.com/web/updates/2017/04/headless-chrome#screenshots
关于google-chrome - headless Chrome REPL 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45939872/