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,13 +1190,22 @@ 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":
text = await check_date_format( try:
value=text, text = await check_date_format(
action=action, value=text,
skyvern_element=skyvern_element, action=action,
task=task, skyvern_element=skyvern_element,
step=step, task=task,
) 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()]