From 3e281915f1a16b467a76ce4b845efcb52435b039 Mon Sep 17 00:00:00 2001 From: LawyZheng Date: Sat, 6 Jul 2024 22:18:22 +0800 Subject: [PATCH] fix bug on HTML tree --- skyvern/webeye/scraper/scraper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skyvern/webeye/scraper/scraper.py b/skyvern/webeye/scraper/scraper.py index 6b2c6f86c..d0357621d 100644 --- a/skyvern/webeye/scraper/scraper.py +++ b/skyvern/webeye/scraper/scraper.py @@ -96,7 +96,7 @@ def json_to_html(element: dict) -> str: ) # Check if the element is self-closing - if tag in ["img", "input", "br", "hr", "meta", "link"]: + if tag in ["img", "input", "br", "hr", "meta", "link"] and not option_html and not children_html: return f'<{tag}{attributes_html if not attributes_html else " "+attributes_html}>' else: return f'<{tag}{attributes_html if not attributes_html else " "+attributes_html}>{text}{children_html+option_html}'