diff --git a/lib/chrome.js b/lib/chrome.js index 47d8802..d6db801 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -843,6 +843,10 @@ var ChromeObject = function() { return parseInt(this.getEvaluatedValue(s)); }; + this.getElementCount = function(selector) { + return this.getEvaluatedValue('document.querySelectorAll("' + selector + '").length'); + }; + this.getPageHeight = function() { var height = 0;