From 193df54c6e0ea78a6c83192568324d33f402e6d8 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Wed, 14 May 2025 10:22:38 -0700 Subject: [PATCH] fix dom listener bug (#2344) --- skyvern/webeye/scraper/domUtils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skyvern/webeye/scraper/domUtils.js b/skyvern/webeye/scraper/domUtils.js index 82e96803..7b6d82e4 100644 --- a/skyvern/webeye/scraper/domUtils.js +++ b/skyvern/webeye/scraper/domUtils.js @@ -2364,6 +2364,9 @@ if (window.globalObserverForDOMIncrement === undefined) { if (node.nodeType === Node.TEXT_NODE) continue; const tagName = node.tagName?.toLowerCase(); + // ignore unique_id change to avoid infinite loop about DOM changes + if (mutation.attributeName === "unique_id") continue; + // if the changing element is dropdown related elements, we should consider // they're the new element as long as the element is still visible on the page if ( @@ -2432,6 +2435,7 @@ if (window.globalObserverForDOMIncrement === undefined) { break; } } + break; } case "childList": { let changedNode = {