This page documents the full public option and enum surface exported from webotron.
| Property | Type | Default in constructor | Description |
|---|
chromePath | string | system Chrome | Optional executable path override. |
headless | boolean | false | Headed by default. Set true for headless automation. |
windowSize | { width: number; height: number } | { width: 1280, height: 800 } | Initial viewport/window dimensions. |
userDataDir | string | resolved profile path | Optional explicit browser profile path. |
profile | ChromeProfileOptions | shared temp profile | Controls default shared vs isolated profile behavior when userDataDir is not provided. |
initialUrl | string | "" | Initial URL for launch/connect flow. |
appMode | boolean | false | Enables app-style browser window mode. |
argv | string | string[] | ChromeArgvMutator | undefined | Adds extra Chrome launch arguments or rewrites the generated argv list. |
attach | ChromeAttachOptions | undefined | Attach to existing browser/target session. |
(argv: string[]) => string[] | void
Receives the generated Chrome command argv list before launch. You can mutate the array in place or return a replacement array.
"shared" | "isolated"
| Property | Type | Description |
|---|
isolation | ChromeProfileIsolation | Use "shared" for a stable temp profile path or "isolated" for a unique generated temp profile. |
cleanupEphemeral | boolean | Defaults to true for isolated profiles. Set false to keep a generated isolated profile after close(). |
| Property | Type | Required | Description |
|---|
browserWSEndpoint | string | one of attach endpoints is required | Browser-level WebSocket endpoint. |
pageWSEndpoint | string | one of attach endpoints is required | Page target WebSocket endpoint. |
devToolsPort | number | one of attach endpoints is required | DevTools HTTP port used to discover target WS endpoint. |
targetUrlStartsWith | string | no | Optional target selection filter when discovering page target. |
processId | number | no | Optional known process ID for attach mode reporting. |
Constructor validation requires at least one of: pageWSEndpoint, browserWSEndpoint, or devToolsPort.
"load" | "domcontentloaded" | "frameNavigated" | "responseReceived" | "eventSourceMessageReceived"
| Property | Type | Description |
|---|
timeoutMs | number | Max wait duration before navigation fails. |
waitUntil | NavigateWaitUntil | Navigation milestone to wait for. |
| Property | Type | Description |
|---|
timeoutMs | number | Max wait duration before failure. |
state | "interactive" | "complete" | Required readyState threshold. |
"observer" | "poll"
"per-request" | "shared"
| Property | Type | Description |
|---|
timeoutMs | number | Max wait duration for selector match. |
intervalMs | number | Poll interval for poll strategy. |
strategy | WaitForElementStrategy | Wait algorithm (observer or poll). |
observerMode | WaitForElementObserverMode | Observer lifecycle mode for observer strategy. |
sharedObserverTtlMs | number | Shared observer idle TTL before automatic cleanup. |
signal | AbortSignal | Optional cancellation signal. |
"queued" | "non-blocking"
| Property | Type | Description |
|---|
mode | EvaluateMode | queued serializes calls; non-blocking skips queueing. |
| Property | Type | Description |
|---|
x | number | Viewport X coordinate. |
y | number | Viewport Y coordinate. |
source | string | Source metadata for how target was resolved. |
Opaque element reference returned by DOM query APIs.
| Property | Type | Description |
|---|
id | string | Internal bridge reference ID for the current page context. |
kind | "element" | Discriminator for handle-aware APIs. |
| Property | Type | Description |
|---|
x | number | Left coordinate in viewport pixels. |
y | number | Top coordinate in viewport pixels. |
width | number | Element width. |
height | number | Element height. |
| Property | Type | Description |
|---|
delayMs | number | Optional delay before click dispatch. |
Extends ClickOptions.
| Property | Type | Description |
|---|
timeoutMs | number | Max selector resolution time before click. |
| Property | Type | Description |
|---|
timeoutMs | number | Max time to resolve element point. |
| Property | Type | Description |
|---|
altKey | boolean | Include Alt modifier. |
ctrlKey | boolean | Include Ctrl modifier. |
metaKey | boolean | Include Meta/Command modifier. |
shiftKey | boolean | Include Shift modifier. |
| Property | Type | Description |
|---|
perCharacterDelayMs | number | Delay between typed characters in milliseconds. Use 0 for fastest typing. |
| Property | Type | Description |
|---|
exact | boolean | Match text exactly instead of using a partial case-insensitive match. |
Extends LocatorMatchOptions.
| Property | Type | Description |
|---|
name | string | Accessible name to match for the role query. |
| Property | Type | Description |
|---|
block | "start" | "center" | "end" | "nearest" | Scroll alignment target for scrollIntoView. |
timeoutMs | number | Max selector wait before scroll action. |
"blob" | "buffer" | "base64" | "shmem"
"png" | "jpeg" | "webp"
| Property | Type | Description |
|---|
x | number | Clip rectangle X coordinate. |
y | number | Clip rectangle Y coordinate. |
width | number | Clip width. |
height | number | Clip height. |
scale | number | Optional clip scale factor. |
| Property | Type | Description |
|---|
encoding | ScreenshotEncoding | Output encoding mode. |
format | ScreenshotFormat | Image format. |
quality | number | Compression quality (format-dependent). |
clip | ScreenshotClipOptions | Optional capture crop rectangle. |