selenium - How to get the load time of each and every single element present on webpage of a site -


how load time of each , every single element present on webpage of site.

for getting page load time can use :

long start = system.currenttimemillis();  driver.get(urls[i]);  long finish = system.currenttimemillis();  long totaltime = (finish - start)/1000;  

but not idea calculate load time of every image, css , js rather can use "http://www.webpagetest.org/".

so @ last question how can perform above task using selenium webdriver?

selenium not tool load time of element, can see in selenium doc findelement(by by) having wait time.

webelement findelement(by by)

find first webelement using given method. method affected 'implicit wait' times in force @ time of execution. findelement(..) invocation return matching row, or try again repeatedly until configured timeout reached. findelement should not used non-present elements, use findelements(by) , assert 0 length response instead.

i suggest can use jmeter it. :)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -