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
browser.pause(milliseconds)
Parameters
Param | Type | Details |
---|---|---|
milliseconds optional | param | time in ms |
Example
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
});