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 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.