I have recently started working on UI testing and was wondering if there is any tool to figure out the time it takes to load the UI page to load in browser including the server response time ( i mean total browser time from request send till page load ). I know that firebug/developer tools can be used to find it manually but is there any other way of doing it. Using selenium, i could use firefox driver and find out the time it takes to get the page and report that time, but i am not sure if it is the correct time.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
A few words about the solution:
We will take help of Google Chrome browser for our reference. As we know when a page loads completely the browser returns
Document.ReadyState
asComplete
to Selenium. That's when Selenium executes the next line of code. We will start the timer and start loading the webpage. When ever thedocument.readyState
will be set tocomplete
we will stop the timer. Here is the Selenium-Java code block: