Chrome のネットワークエミュレーション設定を設定するコマンド。

使用方法

                    .setNetworkConditions(spec, [callback])
                
                    .network.setConditions(spec, [callback])
                

describe('set network conditions', function() {
 it('sets the network conditions',function() {
   browser
    .network.setConditions({
     offline: false,
     latency: 3000,
     download_throughput: 500 * 1024,
     upload_throughput: 500 * 1024
   });
 });
});

パラメータ

名前 説明
spec オブジェクト
callback
オプション
関数

コマンドが完了したときに呼び出されるオプションのコールバック関数。