ChromeDPTarget

@Serializable
data class ChromeDPTarget(val id: String, val title: String, val type: String, val description: String, val url: String, val devtoolsFrontendUrl: String, val webSocketDebuggerUrl: String, val faviconUrl: String? = null)(source)

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.

When a client wants to interact with a target using CDP, it has to first attach to the target. One way to do it is to connect to Chrome via web socket using ChromeDPClient.webSocket and then using BrowserSession.attachToTarget.

However, most of the time, targets don't already exist, so it's easier to just create a new page using BrowserSession.newPage and then interact with it through the returned PageSession.

Constructors

Link copied to clipboard
constructor(id: String, title: String, type: String, description: String, url: String, devtoolsFrontendUrl: String, webSocketDebuggerUrl: String, faviconUrl: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val faviconUrl: String? = null
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val url: String
Link copied to clipboard

The web socket URL to use with HttpClient.chromeWebSocket to connect via the debugger to this target.