diff --git a/lib/clientsidescripts.js b/lib/clientsidescripts.js index 78c1c5cef..4e89c8e7b 100644 --- a/lib/clientsidescripts.js +++ b/lib/clientsidescripts.js @@ -489,7 +489,7 @@ functions.findByCssContainingText = function(cssSelector, searchText, using) { var matches = []; for (var i = 0; i < elements.length; ++i) { var element = elements[i]; - var elementText = element.innerText || element.textContent; + var elementText = element.textContent || element.innerText; if (elementText.indexOf(searchText) > -1) { matches.push(element); }