一、Chrome浏览器自带的开发者工具
1、console中通过js代码获取资源加载时间:window.performance.timing
2、通过python脚本执行
from selenium import webdriver
class TestData:
def test_data(self):
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
print(driver.execute_script("returnJSON.stringify(window.performance.timing)"))