From 0858280db156f924ef126c3aaeae6973b8d44067 Mon Sep 17 00:00:00 2001 From: Julie Ralph Date: Thu, 2 Oct 2014 15:11:22 -0700 Subject: [PATCH] fix(locators): by.cssContainingText now operates on pre-transformed text Previously, the implementation depended on the browser. Now, it will always operate on the text before text-transform is applied. Closes #1217 --- lib/clientsidescripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }