handle exception when check date call failed (#3247)

This commit is contained in:
LawyZheng
2025-08-21 22:23:52 +08:00
committed by GitHub
parent d4877eeadf
commit 38e45e2aba

View File

@@ -1190,6 +1190,7 @@ async def handle_input_text_action(
return [ActionSuccess()] return [ActionSuccess()]
if tag_name == InteractiveElement.INPUT and await skyvern_element.get_attr("type") == "date": if tag_name == InteractiveElement.INPUT and await skyvern_element.get_attr("type") == "date":
try:
text = await check_date_format( text = await check_date_format(
value=text, value=text,
action=action, action=action,
@@ -1197,6 +1198,14 @@ async def handle_input_text_action(
task=task, task=task,
step=step, step=step,
) )
except Exception:
LOG.warning(
"Failed to check the date format, using the original text to fill in the date input",
text=text,
action=action,
exc_info=True,
)
await skyvern_element.input_fill(text=text) await skyvern_element.input_fill(text=text)
return [ActionSuccess()] return [ActionSuccess()]