pause

Pauses execution for a specific amount of time. It is recommended to not use this command to wait for an element to show up. In order to avoid flaky test results it is better to use commands like waitforExist or other waitFor* commands.

Usage

1
browser.pause(milliseconds);

Parameters

Param Type Details
milliseconds Number time in ms

Example

pause.js
1
2
3
4
5
6
it('should pause the execution', function () {
var starttime = new Date().getTime();
browser.pause(3000);
var endtime = new Date().getTime();
console.log(endtime - starttime); // outputs: 3000
});