From 7a75bb3741cb42e225ccc66433fbd0e5ae9164e2 Mon Sep 17 00:00:00 2001 From: LawyZheng Date: Sat, 6 Jul 2024 22:22:22 +0800 Subject: [PATCH] fix bug on HTML tree (#561) --- 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}'