pause
指定した時間だけ実行を一時停止します。要素が表示されるのを待つためにこのコマンドを使用することは推奨されません。不安定なテスト結果を回避するために、waitForExist
やその他のwaitFor*コマンドを使用することをお勧めします。
使用方法
browser.pause(milliseconds)
パラメータ
名前 | 型 | 詳細 |
---|---|---|
milliseconds | 数値 | ミリ秒単位の時間 |
例
pause.js
it('should pause the execution', async () => {
const starttime = new Date().getTime()
await browser.pause(3000)
const endtime = new Date().getTime()
console.log(endtime - starttime) // outputs: 3000
});