--net-log-duration
What does --net-log-duration do?
Specifies the duration (in seconds) for network logging. When this flag is provided with a positive integer value X, Chrome will automatically stop collecting NetLog events after X seconds and flush the log to disk.
Usage
CLILaunch Chrome with --net-log-duration using CLI
chrome --net-log-durationPuppeteerLaunch Chrome with --net-log-duration using Puppeteer
const browser = await puppeteer.launch({
args: ['--net-log-duration']
});PlaywrightLaunch Chrome with --net-log-duration using Playwright
const browser = await chromium.launch({
args: ['--net-log-duration']
});SeleniumLaunch Chrome with --net-log-duration using Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--net-log-duration')
driver = webdriver.Chrome(options=options)