diff --git a/scripts/e2e/index.html b/scripts/e2e/index.html
index fe5971a76d..65b155dcec 100644
--- a/scripts/e2e/index.html
+++ b/scripts/e2e/index.html
@@ -26,6 +26,17 @@
document.dir = 'ltr';
}
+ window.domCount = function domCount(ele) {
+ if(!ele) {
+ return 0;
+ }
+ var count = 1;
+ for(var i = 0; i < ele.children.length; i++) {
+ count += domCount(ele.children[i]);
+ }
+ return count;
+ }
+
if (location.href.indexOf('theme=dark') > -1) {
var link = document.getElementById('ionicLink');
link.setAttribute('href', link.getAttribute('href').replace('.css', '.dark.css'));