Skip to content

Automate browser based workflows with AI

hostfix cua click (#3460)

LawyZheng763eb7bd4f47
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py
index b1b34a9ee..ac4347b9a 100644
--- a/skyvern/webeye/actions/handler.py
+++ b/skyvern/webeye/actions/handler.py
@@ -536,7 +536,7 @@ async def handle_click_action(
if (element.hasAttribute('unique_id')) {
return element.getAttribute('unique_id');
}
-
+
// If no unique_id attribute is found, return null
return null;
}
@@ -550,8 +550,8 @@ async def handle_click_action(
LOG.info("Clicked element at location", x=action.x, y=action.y, element_id=element_id, button=action.button)
if element_id:
if skyvern_element := await dom.safe_get_skyvern_element_by_id(element_id):
- await skyvern_element.navigate_to_a_href(page=page)
- return [ActionSuccess()]
+ if await skyvern_element.navigate_to_a_href(page=page):
+ return [ActionSuccess()]
if action.repeat == 1:
await page.mouse.click(x=action.x, y=action.y, button=action.button)