enhance checkbox detecting (#1840)

Co-authored-by: LawyZheng <lawyzheng1106@gmail.com>
This commit is contained in:
Shuchang Zheng
2025-02-26 02:47:09 -08:00
committed by GitHub
parent ae9380f03f
commit 9b9c84f7dc
2 changed files with 20 additions and 0 deletions

View File

@@ -100,6 +100,10 @@ def json_to_html(element: dict, need_skyvern_attrs: bool = True) -> str:
tag = element["tagName"]
attributes: dict[str, Any] = copy.deepcopy(element.get("attributes", {}))
if element.get("isCheckable", False) and tag != "input":
tag = "input"
attributes["type"] = "checkbox"
context = skyvern_context.ensure_context()
# FIXME: Theoretically, all href links with over 69(64+1+4) length could be hashed