Module: selenium-webdriver/executors
View Source

# class DeferredExecutor

All implemented interfaces
  `webdriver.CommandExecutor`

Wraps a promised `webdriver.CommandExecutor`, ensuring no commands are executed until the wrapped executor has been fully built.

### new DeferredExecutor(delegate)

Parameters

delegate`webdriver.promise.Promise<webdriver.CommandExecutor>`

  The promised delegate.

## Instance Methods

### execute(command, callback)code »

Executes the given `command`. If there is an error executing the command, the provided callback will be invoked with the offending error. Otherwise, the callback will be invoked with a null Error and non-null `bot.response.ResponseObject` object.

Specified by: webdriver.CommandExecutor

Parameters

command`webdriver.Command`

  The command to execute.

callback`function(Error, {status: number, value: *}=): ?`

  the function to invoke when the command response is ready.