From dfad07e9860adaa257c0bfac14c86df44fd93dcd Mon Sep 17 00:00:00 2001 From: LawyZheng Date: Thu, 16 Oct 2025 16:36:25 +0800 Subject: [PATCH] extend datepicker agent (#3734) --- skyvern/webeye/actions/handler.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py index d23c93fd..d1cf9000 100644 --- a/skyvern/webeye/actions/handler.py +++ b/skyvern/webeye/actions/handler.py @@ -785,11 +785,13 @@ async def handle_sequential_click_for_dropdown( if dropdown_select_context.is_date_related: LOG.info( - "The dropdown is date related, exiting the sequential click logic", + "The dropdown is date related, exiting the sequential click logic and skipping the remaining actions", step_id=step.step_id, task_id=task.task_id, ) - return None + result = ActionSuccess() + result.skip_remaining_actions = True + return result LOG.info( "Found the dropdown menu element after clicking, triggering the sequential click logic", @@ -3477,6 +3479,16 @@ async def locate_dropdown_menu( task_id=task.task_id, exc_info=True, ) + # check if opening react-datetime datepicker: https://github.com/arqex/react-datetime + class_name = await head_element.get_attr("class", mode="static") + if class_name and "rdtOpen" in class_name: + LOG.info( + "Confirm it's an opened React-Datetime datepicker", + element_id=element_id, + step_id=step.step_id, + task_id=task.task_id, + ) + return head_element # sometimes taking screenshot might scroll away, need to scroll back after the screenshot x, y = await skyvern_frame.get_scroll_x_y()