common_browser.schemas.configs.operations
Validated operation bounds, browser commands and event expectations.
Classes
Action
Bases: BaseModel
One explicit browser action; values and destinations stay out of repr.
Fields and properties declared here; inherited members belong to the bases above.
button
button: Literal['left', 'middle', 'right'] = 'left'checked
checked: bool = Truedelay_ms
delay_ms: float = Field(default=0, ge=0, allow_inf_nan=False)destination
destination: Target | ElementRef | None = Field(default=None, repr=False)files
files: tuple[Path | UploadFile, ...] = Field(default=(), repr=False)indices
indices: tuple[Annotated[int, Field(ge=0, strict=True)], ...] | None = Field(default=None, repr=False)kind
kind: Literal['goto', 'back', 'forward', 'reload', 'click', 'double_click', 'fill', 'type', 'press', 'hover', 'check', 'select', 'scroll', 'drag', 'upload', 'wait', 'wait_for_load']labels
labels: tuple[str, ...] | None = Field(default=None, repr=False)state
state: Literal['visible', 'hidden', 'attached', 'detached'] = 'visible'target
target: Target | ElementRef | None = Field(default=None, repr=False)value
value: str | None = Field(default=None, repr=False)values
values: tuple[str, ...] | None = Field(default=None, repr=False)wait_until
wait_until: Literal['commit', 'domcontentloaded', 'load', 'networkidle'] = 'domcontentloaded'x
x: float = 0y
y: float = 0click
@classmethoddef click(target: Target | ElementRef, *, button: Literal['left', 'middle', 'right'] = 'left') -> Selffill
@classmethoddef fill(target: Target | ElementRef, value: str) -> Selfgoto
@classmethoddef goto(url: str, *, wait_until: Literal['commit', 'domcontentloaded', 'load', 'networkidle'] = 'domcontentloaded') -> SelfEventWait
Bases: BaseModel
One bounded event match, armed before dispatch or consumed by a watch.
url is an exact URL or a shell-style glob, evaluated on observed events.
Dialogs default to dismiss; choose accept explicitly for confirmations.
Download destinations always refer to the consumer’s filesystem.
max_bytes bounds retained event text/URLs and completed download size;
oversized callback URLs are rejected, never truncated into usable callbacks.
Fields and properties declared here; inherited members belong to the bases above.
accept
accept: bool = Falsecapacity
capacity: int = Field(default=128, gt=0, le=10000)header_names
header_names: tuple[str, ...] = ()include_body
include_body: bool = Falsekind
kind: Literal['navigation', 'request', 'response', 'popup', 'download', 'dialog', 'console']max_bytes
max_bytes: int = Field(default=(32 * 1024 * 1024), gt=0)method
method: str | None = Noneprompt
prompt: str | None = Field(default=None, repr=False)status
status: int | None = Field(default=None, ge=100, le=599)to
to: Path | None = Field(default=None, repr=False)url
url: str | None = Field(default=None, repr=False)dialog
@classmethoddef dialog(*, accept: bool = False, prompt: str | None = None) -> Selfdownload
@classmethoddef download(*, to: Path | str, max_bytes: int = 32 * 1024 * 1024) -> Selfnavigation
@classmethoddef navigation(url: str | None = None) -> Selfpopup
@classmethoddef popup() -> Selfrequest
@classmethoddef request(url: str | None = None, *, method: str | None = None, header_names: tuple[str, ...] = (), include_body: bool = False, max_bytes: int = 32 * 1024 * 1024) -> Selfresponse
@classmethoddef response(url: str | None = None, *, status: int | None = None, header_names: tuple[str, ...] = (), include_body: bool = False, max_bytes: int = 32 * 1024 * 1024) -> SelfOperationConfig
Bases: BaseModel
One operation deadline, in seconds; no browser action replay is implied.
Fields and properties declared here; inherited members belong to the bases above.
deadline
deadline: float | None = Field(default=None, allow_inf_nan=False)timeout
timeout: float = Field(default=30.0, gt=0, allow_inf_nan=False)UploadFile
Bases: BaseModel
One supplied in-memory file; only explicit SDK export reveals its bytes.
Fields and properties declared here; inherited members belong to the bases above.
content
content: SecretBytes = Field(repr=False)mime_type
mime_type: str = Field(default='application/octet-stream', repr=False)name
name: str = Field(min_length=1, max_length=255, repr=False)export
def export() -> dict[str, str | bytes]Explicitly reveal the validated SDK payload at the upload boundary.