Set the amount of time, in milliseconds, that asynchronous scripts executed by .executeAsync are permitted to run before they are aborted and a |Timeout| error is returned to the client.

Syntax

.timeoutsAsyncScript(ms, [callback])

Parameters

Name Type description
ms number

The amount of time, in milliseconds, that time-limited commands are permitted to run.

callback
Optional
function

Optional callback function to be called when the command finishes.

Usage

 this.demoTest = function (browser) {
   browser.timeoutsAsyncScript(10000, function(result) {
     console.log(result);
   });
}