diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py index fa59fee4..29401ba3 100644 --- a/skyvern/webeye/actions/handler.py +++ b/skyvern/webeye/actions/handler.py @@ -1105,6 +1105,8 @@ async def handle_input_text_action( # check if it's selectable if ( not input_or_select_context.is_search_bar # no need to to trigger selection logic for search bar + and not is_totp_value + and not is_secret_value and skyvern_element.get_tag_name() == InteractiveElement.INPUT and not await skyvern_element.is_raw_input() ): diff --git a/skyvern/webeye/utils/dom.py b/skyvern/webeye/utils/dom.py index c10b6de4..ecad0f07 100644 --- a/skyvern/webeye/utils/dom.py +++ b/skyvern/webeye/utils/dom.py @@ -209,6 +209,12 @@ class SkyvernElement: if await self.get_attr("min") or await self.get_attr("max") or await self.get_attr("step"): return True + # maxlength=6 or maxlength=1 usually means it's an OTP input field + # already consider type="tel" or type="number" as raw_input in the previous logic, so need to confirm it for the OTP field + max_length = str(await self.get_attr("maxlength", mode="static")) + if input_type.lower() == "text" and max_length in ["1", "6"]: + return True + return False async def is_spinbtn_input(self) -> bool: