Skip to content

Automate browser based workflows with AI

try to fix mult-level selection trigger (#794)

LawyZhenge7641e74ad58
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py
index f28d5c839..dfb45a8e1 100644
--- a/skyvern/webeye/actions/handler.py
+++ b/skyvern/webeye/actions/handler.py
@@ -1351,6 +1351,8 @@ async def sequentially_select_from_dropdown(
should_relevant=should_relevant,
)
values.append(single_select_result.value)
+ # wait 1s until DOM finished updating
+ await asyncio.sleep(1)
if await single_select_result.is_done():
return single_select_result.action_result, values[-1] if len(values) > 0 else None
@@ -1384,6 +1386,12 @@ async def sequentially_select_from_dropdown(
)
)
if len(secondary_increment_element) == 0:
+ LOG.info(
+ "No incremental element detected for the next level selection, going to quit the custom select mode",
+ selected_time=i + 1,
+ task_id=task.task_id,
+ step_id=step.step_id,
+ )
return single_select_result.action_result, values[-1] if len(values) > 0 else None
return single_select_result.action_result, values[-1] if len(values) > 0 else None