Is there any way to measure page load time?

Hi,

I want to measure page load time.
let’s say i have page #1 and by clicking on button it load page #2.
I know to calculate time from the moment i click on the button until it finds another element in page #2
the problem is that it takes time to find the element in page #2 so its not exactly the page load time.

Any suggestions??

Thanks!

You can try like this

getCurrentTime1() using JAVA
element.Click() // to click button
Wait for specific element in page #2 using webdriver explicit wait
getCurrentTime2() using JAVA
getCurrentTime2()-getCurrentTime1() is page load time what u r referring to..