Hello Damodar, following test script allows you to measure page load of a webpage using Selenium-Python:
from selenium import webdriver
hyperlink = "https://www.edureka.co"
driver = webdriver.Chrome()
driver.get(hyperlink)
navigationStart = driver.execute_script("return window.performance.timing.navigationStart")
responseStart = driver.execute_script("return window.performance.timing.responseStart")
domComplete = driver.execute_script("return window.performance.timing.domComplete")
backendPerformance_calc = responseStart - navigationStart
frontendPerformance_calc = domComplete - responseStart
print("Back End: %s" % backendPerformance_calc)
print("Front End: %s" % frontendPerformance_calc)
driver.quit()
Hope this Helps!!
To learn more, join the online course to do Masters in Python.
Thanks!