Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(protractor): add dummy isPending function
Browse files Browse the repository at this point in the history
See #1021
  • Loading branch information
hankduan committed Aug 19, 2014
1 parent e340ff9 commit 0da1e0c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,17 @@ var buildElementHelper = function(ptor) {
}
};

/**
* Webdriver rely on this function to be present on Promises, so adding
* this dummy function as we inherited from webdriver.promise.Promise, but
* this function is irrelevant to our usage
*
* @return {boolean} Always false as ElementFinder is never in pending state.
*/
ElementFinder.prototype.isPending = function() {
return false;
};

var element = function(locator) {
return new ElementFinder(locator);
};
Expand Down

0 comments on commit 0da1e0c

Please sign in to comment.