Network traffic can be written by pytest-browsermob-proxy. See https://github.com/davehunt/pytest-browsermob-proxy/blob/master/pytest_browsermob_proxy.py#L124