Package-level declarations

Types

Link copied to clipboard
class BrowserConfig(val enableProtocolBackend: Boolean = false, val timeouts: Timeouts = Timeouts(), val maxSessions: Int = 1, val allowPrivateAddresses: Boolean = false, val userAgent: String? = null)

How a browser instance behaves. Every default is the conservative choice: one session, no protocol backend, no private addresses.

Link copied to clipboard

The only exception this library throws.

Link copied to clipboard

What a device can actually do.

Link copied to clipboard

The console method the page called: console.debug/log/warn/error.

Link copied to clipboard

A console message emitted by page script.

Link copied to clipboard
class Cookie(val name: String, val value: String, val domain: String, val path: String = "/", val expiresAtMillis: Long? = null, val secure: Boolean = false, val httpOnly: Boolean = false)

A cookie, as the platform stores it. Cookie storage is process-global.

Link copied to clipboard
interface Dialog

A JavaScript dialog the page opened. Unanswered dialogs block the page.

Link copied to clipboard

Which native dialog a page opened.

Link copied to clipboard
class Element

A matched element, read at the moment of the query.

Link copied to clipboard

Everything that can go wrong, as a closed set.

Link copied to clipboard
interface Frame

A frame within the page. The main frame is always present.

Link copied to clipboard
interface HeadlessBrowser

A browser running inside this app: no server, no cable, no visible UI.

Link copied to clipboard
Link copied to clipboard

The outcome of a navigation.

Link copied to clipboard
interface Page

One page, driven programmatically.

Link copied to clipboard
class Request

A request the page is about to make.

Link copied to clipboard

What a request is for, so rules can be written against categories rather than extensions.

Link copied to clipboard
class Response

A response the page received. Bodies are not captured in v1.

Link copied to clipboard
class Route

A request paused by a matching route rule. Exactly one of the two calls must be made, or the page waits until its navigation ceiling.

Link copied to clipboard
data class SessionMetrics(val sessionDurationMs: Long, val totalNavigations: Int, val totalJsEvaluations: Int, val totalJsExecutionTimeMs: Long, val blockedBytes: Long, val memoryPressureEvents: Int, val rendererCrashes: Int, val droppedCdpEvents: Long = 0)

Diagnostic metrics captured for a dev.webdroid.core.PageSession. All values are collected strictly locally and never transmitted externally.

Link copied to clipboard
class Timeouts(val navigationMillis: Long, val settleMillis: Long, val scriptMillis: Long, val totalMillis: Long)

Ceilings, in milliseconds. Each stage is bounded separately, and total bounds the whole task even when no single stage exceeds its own limit.

Link copied to clipboard
class Viewport(val width: Int, val height: Int, val deviceScaleFactor: Float = 1.0f)

The size a session renders at.

Link copied to clipboard
sealed interface WaitUntil

When a navigation or wait is considered finished.