diff --git a/lib/chrome.js b/lib/chrome.js index 8eab1b5..b7c4d04 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -557,7 +557,8 @@ var ChromeObject = function() { if (searchText.indexOf(':p(') != 0) { s += '(function() {' + ' var elements = Object.values(document.querySelectorAll("' + selector + '")).filter(function(x) {' - + ' return (x.querySelector("' + subSelector + '").innerText.indexOf(decodeURIComponent("' + encodeURIComponent(searchText) + '")) > -1);' + + ' var el = x.querySelector("' + subSelector + '");' + + ' return ([el.innerText, el.getAttribute("aria-label"), el.getAttribute("class")].join(" ").indexOf(decodeURIComponent("' + encodeURIComponent(searchText) + '")) > -1);' + ' });' + ' if (elements.length > 0) {' + ' var rect = elements[0].getBoundingClientRect();'