Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix input on blocking element issue (#3500)
pedrohsdb10fac9bad016
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.pyindex c8fd8cbf0..12077d4a6 100644--- a/skyvern/webeye/actions/handler.py+++ b/skyvern/webeye/actions/handler.py@@ -1178,7 +1178,9 @@ async def handle_input_text_action(LOG.warning("Find a blocking element to the current element, going to input on the blocking element",)- skyvern_element = blocking_element+ if await blocking_element.is_editable():+ skyvern_element = blocking_element+ tag_name = blocking_element.get_tag_name()except Exception:LOG.info("Failed to find the blocking element, continue with the original element",diff --git a/skyvern/webeye/utils/dom.py b/skyvern/webeye/utils/dom.pyindex 449ae3f2e..7a5a914e8 100644--- a/skyvern/webeye/utils/dom.py+++ b/skyvern/webeye/utils/dom.py@@ -285,6 +285,17 @@ class SkyvernElement:skyvern_frame = await SkyvernFrame.create_instance(self.get_frame())return await skyvern_frame.get_element_visible(await self.get_element_handler())+ async def is_editable(self, timeout: float = settings.BROWSER_ACTION_TIMEOUT_MS) -> bool:+ try:+ return await self.get_locator().is_editable(timeout=timeout)+ except Exception:+ LOG.info(+ "Failed to check element editable, considering it's not editable",+ exc_info=True,+ element_id=self.get_id(),+ )+ return False+async def is_parent_of(self, target: ElementHandle) -> bool:skyvern_frame = await SkyvernFrame.create_instance(self.get_frame())return await skyvern_frame.is_parent(await self.get_element_handler(), target)