The function to call when the task executes. If it
returns a webdriver.promise.Promise, the flow will wait
for it to be resolved before starting the next task.
Resolves this promise with the given value. If the value is itself a
promise and not a reference to this deferred, this instance will wait for
it before resolving.
Registers a function to be invoked when this promise is either rejected or
resolved. This function is provided for backwards compatibility with the
Dojo Deferred API.
The function to call when this promise is
either resolved or rejected. The function should expect a single
argument: the resolved value or rejection error.
Registers a function to be invoked when this promise is successfully
resolved. This function is provided for backwards compatibility with the
Dojo Deferred API.
An alias for webdriver.promise.Promise.prototype.then that permits
the scope of the invoked function to be specified. This function is provided
for backwards compatibility with the Dojo Deferred API.
Registers a listener to invoke when this promise is resolved, regardless
of whether the promise's value was successfully computed. This function
is synonymous with the finally clause in a synchronous API:
Note: similar to the finally clause, if the registered
callback returns a rejected promise or throws an error, it will silently
replace the rejection error (if any) from this promise:
Represents the eventual value of a completed operation. Each promise may be
in one of three states: pending, resolved, or rejected. Each promise starts
in the pending state and may make a single transition to either a
fulfilled or failed state.
This class is based on the Promise/A proposal from CommonJS. Additional
functions are provided for API compatibility with Dojo Deferred objects.