Get the performance metrics from the browser.

getPerformanceMetrics() is only available when using Chrome or Edge drivers.

Usage

.getPerformanceMetrics(callback)

Parameters

Name Type description
callback function

Callback function which is called with the performance metrics as argument.

Returns

Type description
object Performance metrics

Example

 this.demoTest = function (browser) {
   browser
     .enablePerformanceMetrics()
     .navigateTo('https://www.google.com');
     .getPerformanceMetrics((metrics) => {
       console.log(metrics);
      });
 };