From c8c85e0d94d7a7211b000650f01af714663611ad Mon Sep 17 00:00:00 2001 From: Julie Date: Wed, 21 May 2014 16:07:51 -0700 Subject: [PATCH] fix(locators): fix by.repeater finding all rows for IE Previously, element.all(by.repeater('foo in foos')) would find non-element nodes for ng-repeat-start elements, which could cause IEDriver to fall over if the test tried to get text from those nodes. --- lib/clientsidescripts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/clientsidescripts.js b/lib/clientsidescripts.js index 33a2b2921..879a1512e 100644 --- a/lib/clientsidescripts.js +++ b/lib/clientsidescripts.js @@ -150,7 +150,9 @@ clientSideScripts.findBindings = function(binding, exactMatch, using) { var elem = repeatElems[i]; while (elem.nodeType != 8 || elem.nodeValue.indexOf(repeater) == -1) { - rows.push(elem); + if (elem.nodeType == 1) { + rows.push(elem); + } elem = elem.nextSibling; } }