From 356046afb80d289a7bac6465562b84b503d4d132 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 17 Apr 2025 03:16:26 -0700 Subject: [PATCH] fix input handler bug (#2180) --- skyvern/webeye/actions/handler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py index 3b2186fd..36703775 100644 --- a/skyvern/webeye/actions/handler.py +++ b/skyvern/webeye/actions/handler.py @@ -823,8 +823,10 @@ async def handle_input_text_action( except Exception: LOG.warning("Failed to clear the input field", action=action, exc_info=True) - # some is supported to use `locator.press_sequentially()` to fill in the data - if skyvern_element.get_tag_name() != "span": + # TODO: some elements are supported to use `locator.press_sequentially()` to fill in the data + # we need find a better way to detect the attribute in the future + class_name: str | None = await skyvern_element.get_attr("class") + if not class_name or "blinking-cursor" not in class_name: return [ActionFailure(InvalidElementForTextInput(element_id=action.element_id, tag_name=tag_name))] await skyvern_element.press_fill(text=text)