From 8eb450c9d9588b2640b0e45824db3b9b57d063e0 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Wed, 21 May 2025 20:41:58 +0900 Subject: [PATCH] Fix `getDeepElementPosition()` couldn't get an element position --- lib/chrome.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chrome.js b/lib/chrome.js index baeebc2..f456a66 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -760,7 +760,7 @@ var ChromeObject = function() { }; this.getDeepElementPosition = function(selectors) { - var result = this.getEvaluatedValue('(function() { var rect = __getDocument().' + this.getShadowRootSelector(selectors) + '.getBoundingClientRect(); return [parseInt(rect.left), parseInt(rect.top), parseInt(__getWindow().pageXOffset + rect.left), parseInt(__getWindow().pageYOffset + rect.top), parseInt(rect.width), parseInt(rect.height)].join(","); })();'); + var result = this.getEvaluatedValue('(function() { var rect = __getDocument()' + this.getShadowRootSelector(selectors) + '.getBoundingClientRect(); return [parseInt(rect.left), parseInt(rect.top), parseInt(__getWindow().pageXOffset + rect.left), parseInt(__getWindow().pageYOffset + rect.top), parseInt(rect.width), parseInt(rect.height)].join(","); })();'); var pos = result.split(','); if (pos.length == 6) {