Package-level declarations

Types

Link copied to clipboard
class ChromeDPClient(remoteDebugUrl: String = "http://localhost:9222", overrideHostHeader: Boolean = false, httpClient: HttpClient = if (overrideHostHeader) DEFAULT_HTTP_CLIENT_WITH_HOST_OVERRIDE else DEFAULT_HTTP_CLIENT)

A client using the Chrome Devtools Protocol to communicate with a running Chrome browser via the debugger API.

Link copied to clipboard
@Serializable
data class ChromeDPTarget(val id: String, val title: String, val type: String, val description: String, val devtoolsFrontendUrl: String, val webSocketDebuggerUrl: String)

Targets are the parts of the browser that the Chrome DevTools Protocol can interact with. This includes pages, service workers, extensions, and also the browser itself.

Link copied to clipboard
@Serializable
data class ChromeVersion(val browser: String, val protocolVersion: String, val userAgent: String, val v8Version: String? = null, val webKitVersion: String, val webSocketDebuggerUrl: String)

Browser version information retrieved via the debugger API.

Link copied to clipboard

This annotation is used on DevTools Protocol APIs and types that are marked as experimental in the protocol itself.

Link copied to clipboard
@Serializable
data class RequestError(val code: Long, val message: String, val data: JsonElement? = null)

Data about an error that occurred when processing a request.

Link copied to clipboard
class RequestFailed(val request: RequestFrame, val error: RequestError) : Exception

An exception thrown when an error occurred during the processing of a request on Chrome side.

Link copied to clipboard
@Serializable
data class RequestFrame(val id: Long, val method: String, val params: JsonElement? = null, val sessionId: String? = null)

A request frame which can be sent to the server, as defined in the protocol's README

Link copied to clipboard

An exception thrown when an error prevented sending a request via the Chrome web socket.

Link copied to clipboard
class TargetCrashedException(val sessionId: SessionID?, val crashEventName: String, val crashEventPayload: JsonElement) : Exception

An exception thrown when an InspectorEvent.TargetCrashed or TargetEvent.TargetCrashed is received.

Functions

Link copied to clipboard
suspend fun HttpClient.chromeWebSocket(webSocketDebuggerUrl: String): BrowserSession

Connects to the Chrome debugger at the given webSocketDebuggerUrl.