Package-level declarations

Types

Link copied to clipboard
interface Browser

Represents a browser instance that can be controlled programmatically.

Link copied to clipboard
data class BrowserSearchConfig(val pathSeparator: String, val searchInPath: Boolean = true, val searchMacosApplications: Boolean = false, val searchWindowsProgramFiles: Boolean = false, val searchLinuxCommonPaths: Boolean = false)

Browser search configuration flags

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
expect abstract class Process
actual abstract class Process
actual typealias Process = java.lang.Process
actual abstract class Process
actual abstract class Process
Link copied to clipboard
data class WebSocketInfo(val host: String, val port: Int, val path: String)

Functions

Link copied to clipboard
expect fun addShutdownHook(hook: suspend () -> Unit)
actual fun addShutdownHook(hook: suspend () -> Unit)
actual fun addShutdownHook(hook: suspend () -> Unit)
actual fun addShutdownHook(hook: suspend () -> Unit)
actual fun addShutdownHook(hook: suspend () -> Unit)
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.

Link copied to clipboard
expect fun exists(path: Path): Boolean
actual fun exists(path: Path): Boolean
actual fun exists(path: Path): Boolean
actual fun exists(path: Path): Boolean
actual fun exists(path: Path): Boolean
Link copied to clipboard
expect fun freePort(): Int?
actual fun freePort(): Int?
actual fun freePort(): Int?
actual fun freePort(): Int?
actual fun freePort(): Int?
Link copied to clipboard
expect fun getEnv(name: String): String?
actual fun getEnv(name: String): String?
actual fun getEnv(name: String): String?
actual fun getEnv(name: String): String?
actual fun getEnv(name: String): String?
Link copied to clipboard
expect fun isPosix(): Boolean
actual fun isPosix(): Boolean
actual fun isPosix(): Boolean
actual fun isPosix(): Boolean
actual fun isPosix(): Boolean
Link copied to clipboard
expect fun isRoot(): Boolean
actual fun isRoot(): Boolean
actual fun isRoot(): Boolean
actual fun isRoot(): Boolean
actual fun isRoot(): Boolean
Link copied to clipboard
expect suspend fun startProcess(exe: Path, params: List<String>): Process
actual suspend fun startProcess(exe: Path, params: List<String>): Process
actual suspend fun startProcess(exe: Path, params: List<String>): Process
actual suspend fun startProcess(exe: Path, params: List<String>): Process
actual suspend fun startProcess(exe: Path, params: List<String>): Process
actual suspend fun startProcess(exe: Path, params: List<String>): Process
Link copied to clipboard
expect fun tempProfileDir(): Path
actual fun tempProfileDir(): Path
actual fun tempProfileDir(): Path
actual fun tempProfileDir(): Path
actual fun tempProfileDir(): Path