mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-29 12:10:28 +00:00
Add PRESS_ENTER action type to extract-action prompt (#SKY-7792) (#4669)
This commit is contained in:
parent
7e6dfcc6d1
commit
226288445d
5 changed files with 60 additions and 3 deletions
|
|
@ -634,6 +634,39 @@ def _action_to_stmt(act: dict[str, Any], task: dict[str, Any], assign_to_output:
|
|||
),
|
||||
)
|
||||
)
|
||||
elif method == "keypress":
|
||||
args.append(
|
||||
cst.Arg(
|
||||
keyword=cst.Name("keys"),
|
||||
value=_value(act.get("keys", ["Enter"])),
|
||||
whitespace_after_arg=cst.ParenthesizedWhitespace(
|
||||
indent=True,
|
||||
last_line=cst.SimpleWhitespace(INDENT),
|
||||
),
|
||||
)
|
||||
)
|
||||
if act.get("hold"):
|
||||
args.append(
|
||||
cst.Arg(
|
||||
keyword=cst.Name("hold"),
|
||||
value=_value(act["hold"]),
|
||||
whitespace_after_arg=cst.ParenthesizedWhitespace(
|
||||
indent=True,
|
||||
last_line=cst.SimpleWhitespace(INDENT),
|
||||
),
|
||||
)
|
||||
)
|
||||
if act.get("duration"):
|
||||
args.append(
|
||||
cst.Arg(
|
||||
keyword=cst.Name("duration"),
|
||||
value=_value(act["duration"]),
|
||||
whitespace_after_arg=cst.ParenthesizedWhitespace(
|
||||
indent=True,
|
||||
last_line=cst.SimpleWhitespace(INDENT),
|
||||
),
|
||||
)
|
||||
)
|
||||
elif method == "wait":
|
||||
args.append(
|
||||
cst.Arg(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue