Skip to content

Automate browser based workflows with AI

fix scrolling action (#4389)

LawyZheng537cb793a6f2
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py
index 4833b498d..f5c645882 100644
--- a/skyvern/webeye/actions/handler.py
+++ b/skyvern/webeye/actions/handler.py
@@ -2187,7 +2187,7 @@ async def handle_scroll_action(
) -> list[ActionResult]:
if action.x and action.y:
await page.mouse.move(action.x, action.y)
- await page.evaluate(f"window.scrollBy({action.scroll_x}, {action.scroll_y})")
+ await page.mouse.wheel(action.scroll_x, action.scroll_y)
return [ActionSuccess()]