Config¶
config ¶
Dataclasses for wavexis configuration and parameters.
BrowserOptions
dataclass
¶
Options for launching a browser instance.
Attributes:
| Name | Type | Description |
|---|---|---|
headless |
bool
|
Run browser in headless mode. |
width |
int
|
Browser window width in pixels. |
height |
int
|
Browser window height in pixels. |
user_agent |
str | None
|
Custom User-Agent string. |
extra_headers |
dict[str, str]
|
Extra HTTP headers to send with every request. |
proxy |
str | None
|
Proxy server URL (e.g. http://proxy:8080 or socks5://proxy:1080). |
timeout |
int
|
Default navigation timeout in milliseconds. |
user_data_dir |
str | None
|
Path to a persistent user data directory for browser profiles. |
browser_url |
str | None
|
URL of an existing browser to connect to (e.g. ws://localhost:9222). |
remote_url |
str | None
|
WebSocket URL of a cloud browser service (e.g. wss://chrome.browserless.io?token=XXX or wss://connect.browserbase.com?token=XXX). |
stealth |
bool
|
Enable anti-bot stealth mode (hides navigator.webdriver, fakes plugins, languages, chrome runtime, permissions). |
Source code in wavexis/config.py
WaitStrategy
dataclass
¶
Strategy for waiting after navigation.
Attributes:
| Name | Type | Description |
|---|---|---|
strategy |
str
|
Wait type — "load", "domcontentloaded", "networkidle", "selector", or "url". |
selector |
str | None
|
CSS selector to wait for (required when strategy="selector"). |
url_pattern |
str | None
|
URL substring to wait for (required when strategy="url"). |
timeout |
int
|
Maximum wait time in milliseconds. |
Source code in wavexis/config.py
from_url
classmethod
¶
Create a load wait strategy from a URL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL to navigate to (used for context only). |
required |
Returns:
| Type | Description |
|---|---|
WaitStrategy
|
A WaitStrategy with strategy="load". |
Source code in wavexis/config.py
ScreenshotParams
dataclass
¶
Parameters for taking a screenshot.
Source code in wavexis/config.py
PDFParams
dataclass
¶
Parameters for generating a PDF.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before generating the PDF. |
paper |
str
|
Paper size name (a4, letter, legal, a3, a5). |
landscape |
bool
|
Use landscape orientation. |
margin |
str
|
Margin string (e.g. "0.4in"). |
no_header_footer |
bool
|
Omit header and footer. |
media |
str
|
CSS media type to emulate ("print" or "screen"). |
wait |
WaitStrategy
|
Wait strategy after navigation. |
js |
str | None
|
Optional JavaScript to execute before PDF generation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
EvalParams
dataclass
¶
Parameters for evaluating a JavaScript expression.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before evaluation. |
expression |
str
|
JavaScript expression to evaluate. |
await_promise |
bool
|
Whether to await a returned Promise. |
file |
str | None
|
Path to a file containing the expression (prefixed with @). |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
DOMParams
dataclass
¶
Parameters for DOM operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before DOM operation. |
action |
str
|
DOM action — "get", "query", "attr", "remove", "focus", "scroll". |
selector |
str
|
CSS selector for the target element. |
outer |
bool
|
Use outerHTML (True) or innerHTML (False) for "get" action. |
all |
bool
|
Query all matching elements (True) or first only (False). |
attribute |
str | None
|
Attribute name for get/set/remove attr actions. |
value |
str | None
|
Attribute value for set attr action. |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
ScrapeParams
dataclass
¶
Parameters for scraping multiple URLs.
Attributes:
| Name | Type | Description |
|---|---|---|
urls |
list[str]
|
List of URLs to scrape. |
expression |
str
|
JavaScript expression to evaluate on each page. |
file |
str | None
|
Path to a file containing the expression (prefixed with @). |
output_format |
str
|
Output format — "json" or "csv". |
selector |
str | None
|
Optional CSS selector to wait for on each page. |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
HarParams
dataclass
¶
Parameters for HAR capture.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to for HAR capture. |
wait |
WaitStrategy
|
Time to wait after navigation in milliseconds. |
filter |
str | None
|
Optional URL filter pattern to include only matching entries. |
timeout |
int
|
Maximum capture timeout in milliseconds. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
CookieParams
dataclass
¶
Parameters for setting a cookie.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Cookie name. |
value |
str
|
Cookie value. |
domain |
str
|
Cookie domain. |
path |
str
|
Cookie path. |
secure |
bool
|
Whether cookie is secure-only. |
http_only |
bool
|
Whether cookie is HTTP-only. |
same_site |
str
|
SameSite attribute — "Lax", "Strict", or "None". |
Source code in wavexis/config.py
NetworkParams
dataclass
¶
Parameters for network operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str | None
|
URL to navigate to (for cookies get). |
action |
str
|
Network action — "cookies_get", "cookies_set", "cookies_delete", "cookies_clear", "headers", "user_agent". |
headers |
dict[str, str] | None
|
Dict of HTTP headers to set. |
user_agent |
str | None
|
User-Agent string to set. |
cookies |
list[dict[str, str]] | None
|
List of cookie dicts to set. |
cookie |
CookieParams | None
|
Single CookieParams for set/delete. |
name |
str | None
|
Cookie name for delete. |
domain |
str | None
|
Cookie domain for delete. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
EmulationParams
dataclass
¶
Parameters for emulation operations.
Attributes:
| Name | Type | Description |
|---|---|---|
action |
str
|
Emulation action — 'device', 'viewport', 'geolocation', 'timezone', 'dark_mode'. |
device |
str | None
|
Device preset name for 'device' action. |
width |
int
|
Viewport width for 'viewport' action. |
height |
int
|
Viewport height for 'viewport' action. |
device_scale_factor |
float
|
Device pixel scale factor for 'viewport' action. |
latitude |
float
|
Latitude for 'geolocation' action. |
longitude |
float
|
Longitude for 'geolocation' action. |
accuracy |
float
|
Accuracy in meters for 'geolocation' action. |
timezone |
str
|
IANA timezone ID for 'timezone' action. |
dark_mode |
bool
|
Enable dark mode for 'dark_mode' action. |
url |
str
|
URL to navigate to before emulation (optional). |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
InputParams
dataclass
¶
Parameters for input interactions.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before the input action. |
selector |
str
|
CSS selector for the target element. |
action |
str
|
Input action — "click", "type", "fill", "select", "hover", "key", "drag", "tap", "scroll", "upload". |
text |
str | None
|
Text to type (for "type" action). |
value |
str | None
|
Value to fill or select (for "fill" and "select" actions). |
key |
str | None
|
Key to press (for "key" action, e.g. "Enter", "Tab"). |
button |
str
|
Mouse button for click — "left", "right", "middle". |
click_count |
int
|
Number of clicks for click action. |
delay |
int
|
Delay between keystrokes in milliseconds (for "type" action). |
source |
str | None
|
Source CSS selector for "drag" action. |
target |
str | None
|
Target CSS selector for "drag" action. |
scroll_x |
int
|
Horizontal scroll offset (for "scroll" action). |
scroll_y |
int
|
Vertical scroll offset (for "scroll" action). |
files |
list[str] | None
|
List of file paths to upload (for "upload" action). |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
ThrottleParams
dataclass
¶
Parameters for network throttling.
Attributes:
| Name | Type | Description |
|---|---|---|
offline |
bool
|
If True, emulate network offline state. |
latency_ms |
int
|
Emulated latency in milliseconds. |
download_bps |
int
|
Max download throughput in bytes/sec (-1 for unlimited). |
upload_bps |
int
|
Max upload throughput in bytes/sec (-1 for unlimited). |
Source code in wavexis/config.py
SensorParams
dataclass
¶
Parameters for sensor emulation.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Sensor type — "geolocation", "device-orientation", "ambient-light". |
values |
dict[str, Any]
|
Dict of sensor-specific values (e.g. latitude, longitude, accuracy). |
Source code in wavexis/config.py
ScreencastParams
dataclass
¶
Parameters for capturing a screencast.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before screencast. |
format |
str
|
Image format for each frame ("png" or "jpeg"). |
quality |
int
|
JPEG quality (0-100). |
max_width |
int
|
Max frame width in pixels. |
max_height |
int
|
Max frame height in pixels. |
duration |
float
|
Maximum capture duration in seconds. |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
StorageParams
dataclass
¶
Parameters for storage operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before storage operations. |
key |
str | None
|
Storage key for get/set actions. |
value |
str | None
|
Value for set action. |
storage_type |
str
|
"local" or "session" for DOM storage. |
cache_name |
str | None
|
Cache name for cache storage actions. |
database |
str | None
|
IndexedDB database name. |
store |
str | None
|
IndexedDB object store name. |
action |
str
|
Storage action — "get", "set", "clear", "list", "cache-list", "cache-entries", "cache-delete", "indexeddb-list", "indexeddb-get", "indexeddb-clear". |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
AnimationParams
dataclass
¶
Parameters for animation operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before animation operations. |
animation_id |
str | None
|
Animation ID for pause/play/seek actions. |
time_ms |
int | None
|
Target time in milliseconds for seek action. |
action |
str
|
Animation action — "list", "pause", "play", "seek". |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
CSSParams
dataclass
¶
Parameters for CSS inspection operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before CSS inspection. |
selector |
str | None
|
CSS selector for the target element. |
node_id |
str | None
|
Node ID (alternative to selector). |
stylesheet_id |
str | None
|
Stylesheet ID for rules action. |
action |
str
|
CSS action — "styles", "stylesheets", "rules", "computed". |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
DebugParams
dataclass
¶
Parameters for debugging operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str | None
|
URL to navigate to before debugging (optional for step/pause/resume). |
line |
int | None
|
Line number for breakpoint (0-based). |
function_name |
str | None
|
Function name for function breakpoint. |
condition |
str | None
|
Optional condition expression for breakpoint. |
action |
str
|
Debug action — "breakpoint", "function_breakpoint", "remove_breakpoint", "step_over", "step_into", "step_out", "pause", "resume", "listeners". |
breakpoint_id |
str | None
|
Breakpoint ID for remove_breakpoint. |
selector |
str | None
|
CSS selector for listeners action. |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
CookieActionParams
dataclass
¶
Parameters for cookie operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before cookie operations. |
action |
str
|
Cookie action — "get", "set", "delete", "clear". |
cookie |
CookieParams
|
Cookie parameters for set action. |
name |
str
|
Cookie name for delete action. |
domain |
str
|
Cookie domain for delete action. |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |
Source code in wavexis/config.py
HeaderParams
dataclass
¶
Parameters for header and user-agent operations.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
URL to navigate to before setting headers. |
action |
str
|
Header action — "set-headers", "set-user-agent". |
headers |
dict[str, str]
|
Extra HTTP headers for set-headers action. |
user_agent |
str
|
User-Agent string for set-user-agent action. |
wait |
WaitStrategy
|
Wait strategy after navigation. |
browser |
BrowserOptions
|
Browser launch options. |