From 714e4e28ab90fb5dfeca4375a68469ef609e2722 Mon Sep 17 00:00:00 2001 From: Julie Ralph Date: Fri, 26 Sep 2014 14:14:00 -0700 Subject: [PATCH] fix(locators): fix regression passing root element to locator scripts Closes #1378 --- lib/protractor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/protractor.js b/lib/protractor.js index 97023bce2..23cbb4b85 100644 --- a/lib/protractor.js +++ b/lib/protractor.js @@ -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); } @@ -193,7 +193,7 @@ var buildElementHelper = function(ptor) { // list of Promise> 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); });