CodeGen part1 - move ActionType to it's own py file (#2655)
This commit is contained in:
@@ -6,48 +6,12 @@ import structlog
|
||||
from litellm import ConfigDict
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from skyvern.webeye.actions.action_types import ActionType
|
||||
|
||||
LOG = structlog.get_logger()
|
||||
T = TypeVar("T", bound="Action")
|
||||
|
||||
|
||||
class ActionType(StrEnum):
|
||||
CLICK = "click"
|
||||
INPUT_TEXT = "input_text"
|
||||
UPLOAD_FILE = "upload_file"
|
||||
|
||||
# This action is not used in the current implementation. Click actions are used instead."
|
||||
DOWNLOAD_FILE = "download_file"
|
||||
|
||||
SELECT_OPTION = "select_option"
|
||||
CHECKBOX = "checkbox"
|
||||
WAIT = "wait"
|
||||
NULL_ACTION = "null_action"
|
||||
SOLVE_CAPTCHA = "solve_captcha"
|
||||
TERMINATE = "terminate"
|
||||
COMPLETE = "complete"
|
||||
RELOAD_PAGE = "reload_page"
|
||||
|
||||
EXTRACT = "extract"
|
||||
VERIFICATION_CODE = "verification_code"
|
||||
|
||||
SCROLL = "scroll"
|
||||
KEYPRESS = "keypress"
|
||||
TYPE = "type"
|
||||
MOVE = "move"
|
||||
DRAG = "drag"
|
||||
LEFT_MOUSE = "left_mouse"
|
||||
|
||||
def is_web_action(self) -> bool:
|
||||
return self in [
|
||||
ActionType.CLICK,
|
||||
ActionType.INPUT_TEXT,
|
||||
ActionType.UPLOAD_FILE,
|
||||
ActionType.DOWNLOAD_FILE,
|
||||
ActionType.SELECT_OPTION,
|
||||
ActionType.CHECKBOX,
|
||||
]
|
||||
|
||||
|
||||
class ActionStatus(StrEnum):
|
||||
pending = "pending"
|
||||
skipped = "skipped"
|
||||
|
||||
Reference in New Issue
Block a user