Chrome: Obtain HTTP/2 Log from net-internals
Asked Answered
B

2

14

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.

Bentlee answered 17/2, 2017 at 9:59 Comment(0)
B
0

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

Bentlee answered 1/3, 2017 at 16:45 Comment(0)
H
0

You can use the Fiddler Core C# API

Fiddler.FiddlerApplication.AfterSessionComplete += FiddlerApplication_AfterSessionComplete;
Fiddler.FiddlerApplication.Startup(8888, FiddlerCoreStartupFlags.Default);
Fiddler.FiddlerApplication.AfterSessionComplete += delegate(Fiddler.Session oS)
        {
                Monitor.Enter(oAllSessions);
                oAllSessions.Add(oS);
                Monitor.Exit(oAllSessions);
        };
Fiddler.FiddlerApplication.Shutdown();

Check the official documentation, you need lots more code, but in the end, you will have all you need.

Hashim answered 23/2, 2017 at 9:11 Comment(0)
B
0

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

Bentlee answered 1/3, 2017 at 16:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.