From c810096bf3865fdf4ba38a7a5872b8e7767ad48d Mon Sep 17 00:00:00 2001 From: LawyZheng Date: Wed, 3 Dec 2025 02:43:26 +0800 Subject: [PATCH] improve chain click logic (#4168) --- skyvern/webeye/actions/handler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py index 6d8f6822..8f18edb5 100644 --- a/skyvern/webeye/actions/handler.py +++ b/skyvern/webeye/actions/handler.py @@ -2338,7 +2338,8 @@ async def chain_click( locator=locator, ) if bound_locator := await skyvern_element.find_bound_label_by_attr_id(): - await bound_locator.click(timeout=timeout) + # click on (0, 0) to avoid playwright clicking on the wrong element by accident + await bound_locator.click(timeout=timeout, position={"x": 0, "y": 0}) action_results.append(ActionSuccess()) return action_results except Exception as e: @@ -2354,7 +2355,8 @@ async def chain_click( locator=locator, ) if bound_locator := await skyvern_element.find_bound_label_by_direct_parent(): - await bound_locator.click(timeout=timeout) + # click on (0, 0) to avoid playwright clicking on the wrong element by accident + await bound_locator.click(timeout=timeout, position={"x": 0, "y": 0}) action_results.append(ActionSuccess()) return action_results except Exception as e: