Any functional testing tool should provide timer objects to calculate page response time.
In QTP we have "MercuryTimers.Timer()" , but I didn't find similar stuff in selenium, so I started using following code for calculating page response time.
long start;
start = System.currentTimeMillis();
selenium.click("popup_ok");
selenium.waitForPageToLoad(Timeout);
System.out.println("Login Page : " + (System.currentTimeMillis() - start) + " msec.");
Selenium timer extension
---
Hi Bharat,
ReplyDeleteIs there any function in selenium to estimate the test run time even before running the test, (Ex: similar to, while copying a file, the estimated time of completion of copy is displayed) ?
TestNG has built in timer that would calculate the time and display it in the report.
DeleteHello Am New To Selenium wants to know page response time function will affect the testsuite or not ?
ReplyDeleteNo, It is handled by Java not through Selenium.
ReplyDeleteThis might not work if the page contain AJAX related items.