.getPerformanceMetrics() 編集を提案
バージョン: 2.2.0 以降ブラウザからパフォーマンスメトリクスを取得します。メトリクスの収集は、enablePerformanceMetrics()
コマンドが呼び出された後にのみ開始されます。
使用方法
.getPerformanceMetrics(callback)
例
describe('collect performance metrics', function() {
it('enables the metrics collection, does some stuff and collects the metrics', function() {
browser
.enablePerformanceMetrics()
.navigateTo('https://www.google.com')
.getPerformanceMetrics((result) => {
if (result.status === 0) {
const metrics = result.value;
console.log(metrics);
}
});
});
});
パラメータ
名前 | 型 | 説明 |
---|---|---|
callback |
関数 | パフォーマンスメトリクスを含むオブジェクトを引数として渡して呼び出されるコールバック関数。 |
戻り値
型 | 説明 |
---|---|
Promise<object> | 最後に |