mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-05-02 21:50:20 +00:00
Some checks failed
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
Build Skyvern SDK and publish to PyPI / check-version-change (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / run-ci (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / build-sdk (push) Has been cancelled
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
from enum import StrEnum
|
|
from pathlib import Path
|
|
|
|
# This is the attribute name used to tag interactable elements
|
|
SKYVERN_ID_ATTR: str = "unique_id"
|
|
SKYVERN_DIR = Path(__file__).parent
|
|
REPO_ROOT_DIR = SKYVERN_DIR.parent
|
|
|
|
INPUT_TEXT_TIMEOUT = 120000 # 2 minutes
|
|
PAGE_CONTENT_TIMEOUT = 300 # 5 mins
|
|
BROWSER_CLOSE_TIMEOUT = 180 # 3 minute
|
|
BROWSER_DOWNLOAD_MAX_WAIT_TIME = 1200 # 20 minute
|
|
BROWSER_DOWNLOAD_TIMEOUT = 600 # 10 minute
|
|
DOWNLOAD_FILE_PREFIX = "downloads"
|
|
SAVE_DOWNLOADED_FILES_TIMEOUT = 180
|
|
GET_DOWNLOADED_FILES_TIMEOUT = 30
|
|
NAVIGATION_MAX_RETRY_TIME = 5
|
|
AUTO_COMPLETION_POTENTIAL_VALUES_COUNT = 3
|
|
DROPDOWN_MENU_MAX_DISTANCE = 100
|
|
BROWSER_DOWNLOADING_SUFFIX = ".crdownload"
|
|
MAX_UPLOAD_FILE_COUNT = 50
|
|
AZURE_BLOB_STORAGE_MAX_UPLOAD_FILE_COUNT = 50
|
|
DEFAULT_MAX_SCREENSHOT_SCROLLS = 3
|
|
|
|
# reserved fields for navigation payload
|
|
SPECIAL_FIELD_VERIFICATION_CODE = "verification_code"
|
|
|
|
|
|
class ScrapeType(StrEnum):
|
|
NORMAL = "normal"
|
|
STOPLOADING = "stoploading"
|
|
RELOAD = "reload"
|
|
|
|
|
|
SCRAPE_TYPE_ORDER = [ScrapeType.NORMAL, ScrapeType.NORMAL, ScrapeType.RELOAD]
|
|
DEFAULT_MAX_TOKENS = 100000
|
|
MAX_IMAGE_MESSAGES = 10
|
|
SCROLL_AMOUNT_MULTIPLIER = 100
|
|
|
|
# Text input constants
|
|
TEXT_INPUT_DELAY = 10 # 10ms between each character input
|
|
TEXT_PRESS_MAX_LENGTH = 20
|