revert checkbox detect enhance (#1998)

This commit is contained in:
Shuchang Zheng
2025-03-21 18:07:58 -07:00
committed by GitHub
parent 4f37078433
commit d8d8f8ab79
2 changed files with 0 additions and 20 deletions

View File

@@ -811,21 +811,6 @@ function isDatePickerSelector(element) {
return false;
}
function isCheckableDiv(element) {
const tagName = element.tagName.toLowerCase();
if (tagName !== "div") {
return false;
}
if (
element.className &&
element.className.toString().includes("checkbox") &&
element.childElementCount === 0
) {
return true;
}
return false;
}
const isComboboxDropdown = (element) => {
if (element.tagName.toLowerCase() !== "input") {
return false;
@@ -1345,7 +1330,6 @@ async function buildElementObject(
isAngularMaterialDatePicker(element) ||
isSelect2Dropdown(element) ||
isSelect2MultiChoice(element),
isCheckable: isCheckableDiv(element),
};
let isInShadowRoot = element.getRootNode() instanceof ShadowRoot;

View File

@@ -105,10 +105,6 @@ def json_to_html(element: dict, need_skyvern_attrs: bool = True) -> str:
LOG.info("Element is interactable. Trimmed all attributes instead of dropping it", element=element)
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