There are many tools that are designed specifically to measure a load of your web pages such as LoadRunner, JMeter, WebLoad, etc. and preference should be given to these tools only. But in case, there is an ask to do it using Selenium, we can use Performance Timing and Navigation Interface APIs to measure the page load time on client-side:
The first image shows when we are executing it manually on the Chrome Dev Tools console. We can use the output generated by these APIs in our Se framework (if required) as shown in the Second Image.
P.S. As from Se4 alpha-3 onwards, we can directly play with Dev Tools- I will check if we can directly use it instead of capturing time using these APIs.
#selenium #loadTime #devTools #testAutomation #seleniumautomation
Comments
Post a Comment