From 303153b305c5e6a7f484a1ad8345d7f1ca4b85c9 Mon Sep 17 00:00:00 2001 From: LawyZheng Date: Mon, 25 Nov 2024 09:49:14 +0800 Subject: [PATCH] fix shadow host parsing issue (#1253) --- skyvern/webeye/scraper/domUtils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skyvern/webeye/scraper/domUtils.js b/skyvern/webeye/scraper/domUtils.js index 5eedbdb87..af79abd1d 100644 --- a/skyvern/webeye/scraper/domUtils.js +++ b/skyvern/webeye/scraper/domUtils.js @@ -1234,6 +1234,11 @@ function buildElementTree(starter = document.body, frame, full_tree = false) { const childElement = children[i]; processElement(childElement, shadowHostElement.id); } + const selfChildren = getChildElements(element); + for (let i = 0; i < selfChildren.length; i++) { + const childElement = selfChildren[i]; + processElement(childElement, shadowHostElement.id); + } } else { // For a non-interactable element, if it has direct text, we also tagged // it with unique_id, but with interatable=false in the element.