##获取页面加载时间
url='http://192.168.1.199/'
x=webdriver.Chrome()
x.get(url)
x.find_element(By.ID,'username').send_keys('su')
x.find_element(By.ID,'password').send_keys('123456')
x.find_element(By.XPATH,'//*[@id="login"]/div[3]/input[1]').click()
试过用loadEventTime这个方法 但是报错
加载完页面可以获取一个加载页面的时间用来输出
from datetime import datetime
##获取页面加载时间
a = datetime.now()
url='http://192.168.1.199/'
x=webdriver.Chrome()
x.get(url)
x.find_element(By.ID,'username').send_keys('su')
x.find_element(By.ID,'password').send_keys('123456')
x.find_element(By.XPATH,'//*[@id="login"]/div[3]/input[1]').click()
prinr(datetime.now() - a)