long start = System.currentTimeMillis();
driver.get("http://www.website.com");
// Locate an element [code here]
long finish = System.currentTimeMillis();
long TotalTime = finish - start;
System.out.println("Total Time for page load - "+TotalTime);
#PYTHON
def setUp(self):
self.startTime = time.time()
def tearDown(self):
t = time.time() - self.startTime
print "%s: %.3f" % (self.id(), t)
self.driver.quit
driver.get("http://www.website.com");
// Locate an element [code here]
long finish = System.currentTimeMillis();
long TotalTime = finish - start;
System.out.println("Total Time for page load - "+TotalTime);
#PYTHON
def setUp(self):
self.startTime = time.time()
def tearDown(self):
t = time.time() - self.startTime
print "%s: %.3f" % (self.id(), t)
self.driver.quit
Is there any way to the show the load time of the page or element in the testng-reports?
ReplyDelete