Package-level declarations

Types

Link copied to clipboard
interface Browser

Represents a browser instance that can be controlled programmatically.

Link copied to clipboard
interface BrowserTarget
Link copied to clipboard
class Config(userDataDir: Path? = null, val headless: Boolean = Defaults.HEADLESS, val userAgent: String? = null, browserExecutablePath: Path? = null, browserArgs: List<String>? = null, sandbox: Boolean = Defaults.SANDBOX, val lang: String? = null, var host: String? = null, var port: Int? = null, val expert: Boolean = Defaults.EXPERT, val browserConnectionTimeout: Long = Defaults.BROWSER_CONNECTION_TIMEOUT, val browserConnectionMaxTries: Int = Defaults.BROWSER_CONNECTION_MAX_TRIES, val autoDiscoverTargets: Boolean = Defaults.AUTO_DISCOVER_TARGETS)
Link copied to clipboard

Builder class for creating Config instances using Kotlin DSL syntax.

Link copied to clipboard
@Serializable
data class ContraDict(val webSocketDebuggerUrl: String)
Link copied to clipboard
open class DefaultBrowser(val coroutineScope: CoroutineScope, val config: Config) : Browser

Default implementation of the Browser interface.

Link copied to clipboard
class HTTPApi(host: String, port: Int)
Link copied to clipboard
data class WebSocketInfo(val host: String, val port: Int, val path: String)

Functions

Link copied to clipboard
fun config(block: ConfigBuilder.() -> Unit): Config

Creates a Config instance using Kotlin DSL syntax.

Link copied to clipboard
suspend fun createBrowser(coroutineScope: CoroutineScope, config: Config): Browser
suspend fun createBrowser(coroutineScope: CoroutineScope, userDataDir: Path? = null, headless: Boolean = false, userAgent: String? = null, browserExecutablePath: Path? = null, browserArgs: List<String>? = null, sandbox: Boolean = true, lang: String? = null, host: String? = null, port: Int? = null): Browser

The entry point for creating a new Browser instance.

suspend fun createBrowser(coroutineScope: CoroutineScope, block: ConfigBuilder.() -> Unit): Browser

The entry point for creating a new Browser instance using DSL configuration.