Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
not try selectable input for otp or secret input (#3843)
LawyZheng31eca44f8e1f
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.pyindex fa59fee42..29401ba3a 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 selectableif (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_valueand skyvern_element.get_tag_name() == InteractiveElement.INPUTand not await skyvern_element.is_raw_input()):diff --git a/skyvern/webeye/utils/dom.py b/skyvern/webeye/utils/dom.pyindex c10b6de4d..ecad0f070 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 Falseasync def is_spinbtn_input(self) -> bool: