Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
skip unnecessary select-dropdown check for input (#862)
LawyZheng1b2bdcb94912
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.pyindex 1e2977627..337307e74 100644--- a/skyvern/webeye/actions/handler.py+++ b/skyvern/webeye/actions/handler.py@@ -416,7 +416,7 @@ async def handle_input_text_action(incremental_element: list[dict] = []# check if it's selectable- if skyvern_element.get_tag_name() == InteractiveElement.INPUT and not await skyvern_element.is_spinbtn_input():+ if skyvern_element.get_tag_name() == InteractiveElement.INPUT and not await skyvern_element.is_raw_input():await skyvern_element.scroll_into_view()select_action = SelectOptionAction(reasoning=action.reasoning,diff --git a/skyvern/webeye/utils/dom.py b/skyvern/webeye/utils/dom.pyindex c1fa3e765..0cb0f3b46 100644--- a/skyvern/webeye/utils/dom.py+++ b/skyvern/webeye/utils/dom.py@@ -84,6 +84,8 @@ class InteractiveElement(StrEnum):SELECTABLE_ELEMENT = [InteractiveElement.INPUT, InteractiveElement.SELECT]+RAW_INPUT_TYPE_VALUE = ["number", "url", "tel", "email", "username", "password"]+RAW_INPUT_NAME_VALUE = ["name", "email", "username", "password", "phone"]class SkyvernOptionType(typing.TypedDict):@@ -197,6 +199,23 @@ class SkyvernElement:button_type = await self.get_attr("type")return button_type == "radio"+ async def is_raw_input(self) -> bool:+ if self.get_tag_name() != InteractiveElement.INPUT:+ return False++ if await self.is_spinbtn_input():+ return True++ input_type = str(await self.get_attr("type"))+ if input_type.lower() in RAW_INPUT_TYPE_VALUE:+ return True++ name = str(await self.get_attr("name"))+ if name.lower() in RAW_INPUT_NAME_VALUE:+ return True++ return False+async def is_spinbtn_input(self) -> bool:"""confirm the element is: