How to use python to get Summary data in Chrome Dev Tools Network panel?

clipboard.png
:
Page Loading Time Testpython networkFinish
Finish


:

clipboard.png

is currently modified as follows:

navigationStart = driver.execute_script("return window.PerformanceTiming.navigationStart")
responseEnd = driver.execute_script("return window.PerformanceTiming.responseEnd")
loadEventEnd = driver.execute_script("return window.PerformanceTiming.loadEventEnd")

backendPerformance = responseEnd - navigationStart
frontendPerformance = loadEventEnd - responseEnd
FinisheTime = backendPerformance + frontendPerformance

I don"t know whether it is right or not, please correct it if you have experience, thank you!

Aug.13,2021

window.performance.getEntries () returns a list of the crawl times for each item.
duration is the duration
startTime is the start time
responseEnd is the response end time

subtracting the largest responseEnd from the smallest startTime, should be Finish time.


navigationStart = driver.execute_script("return window.performance.timing.navigationStart")
responseEnd = driver.execute_script("return window.performance.timing.responseEnd")
domComplete = driver.execute_script("return window.performance.timing.domComplete")
loadEventEnd = driver.execute_script("return window.performance.timing.loadEventEnd")

backendPerformance = responseEnd-navigationStart
domperformance = domComplete - responseEnd
frontendPerformance = loadEventEnd-responseEnd
FinisheTime = backendPerformance+frontendPerformance

finally uses this, which is actually pretty much the same as chromedevtool.
clipboard.png

Menu