Search code examples
google-chromeseleniumgoogle-chrome-devtoolsselenium-chromedriverhttp2

Chrome: Obtain HTTP/2 Log from net-internals


Is there a way to programatically obtain the HTTP/2 logs from

chrome://net-internals/#http2

either through selenium or a commandline option?

I want to do automated tests with HTTP/2 and i am using selenium-chromedriver.

I know that you can access the perflogs from chromedriver, however those seem to hide many HTTP/2-specific things such as priority, or stream id.


Solution

  • It is possible to start chrome with --log-net-log=output.json.

    However, currently there is a bug in chromedriver that truncates the log. https://bugs.chromium.org/p/chromedriver/issues/detail?id=1688#c1