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

Commit

Permalink
fix(locators): fix regression passing root element to locator scripts
Browse files Browse the repository at this point in the history
Closes #1378
  • Loading branch information
juliemr committed Sep 26, 2014
1 parent 60a4fe1 commit 714e4e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ var buildElementHelper = function(ptor) {
// This is the first time we are looking for an element
return ptor.waitForAngular().then(function() {
if (locator.findElementsOverride) {
return locator.findElementsOverride(ptor.driver);
return locator.findElementsOverride(ptor.driver, null, ptor.rootEl);
} else {
return ptor.driver.findElements(locator);
}
Expand All @@ -193,7 +193,7 @@ var buildElementHelper = function(ptor) {
// list of Promise<List<child_web_element>>
parentWebElements.forEach(function(parentWebElement) {
var childrenPromise = locator.findElementsOverride ?
locator.findElementsOverride(ptor.driver, parentWebElement) :
locator.findElementsOverride(ptor.driver, parentWebElement, ptor.rootEl) :
parentWebElement.findElements(locator);
childrenPromiseList.push(childrenPromise);
});
Expand Down

0 comments on commit 714e4e2

Please sign in to comment.