How to create and manipulate promises in Protractor?

Protractor uses WebDriver’s promises and exposes that API globally on ‘protractor’. So you should be able to do

var deferred = protractor.promise.defer();
return deferred.promise;

For the full WebDriverJS Promise API, see the code at https://code.google.com/p/selenium/source/browse/javascript/webdriver/promise.js

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.