Skip to content

Commit e460a6e

Browse files
committed
fix(protractor): add dummy isPending function
See angular/protractor#1021
1 parent 2589ff3 commit e460a6e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/protractor.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,17 @@ var buildElementHelper = function(ptor) {
748748
}
749749
};
750750

751+
/**
752+
* Webdriver rely on this function to be present on Promises, so adding
753+
* this dummy function as we inherited from webdriver.promise.Promise, but
754+
* this function is irrelevant to our usage
755+
*
756+
* @return {boolean} Always false as ElementFinder is never in pending state.
757+
*/
758+
ElementFinder.prototype.isPending = function() {
759+
return false;
760+
};
761+
751762
var element = function(locator) {
752763
return new ElementFinder(locator);
753764
};

0 commit comments

Comments
 (0)