-1

I want to calculate the finish time which we get in the Network Tab/Panel of Firefox ? Any API or any approach used for calculating it is appreciated. Finish time and not only load time. Finish Time as shown in the image

1

1 Answer 1

0

This can be accomplished by the difference between navigation start and load event end:

from selenium import webdriver

driver = webdriver.Firefox()
driver.get('https://stackoverflow.com')
load_time = driver.execute_script('return performance.timing.loadEventEnd - performance.timing.navigationStart;')

This will give you the load time in milliseconds

1
  • the given code will help me to calculate the load time and not the finish time. You can refer this link to clear the difference between load time and finish time stackoverflow.com/questions/30266960/…
    – DJSam
    Commented Sep 18, 2017 at 18:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.