DefaultBrowser

open class DefaultBrowser(val coroutineScope: CoroutineScope, val config: Config) : Browser

Default implementation of the Browser interface.

Constructors

Link copied to clipboard
constructor(coroutineScope: CoroutineScope, config: Config)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val config: Config

The configuration for the browser instance.

Link copied to clipboard
open override var connection: Connection?

The connection to the browser's WebSocket debugger.

Link copied to clipboard
val coroutineScope: CoroutineScope
Link copied to clipboard
open override var info: ContraDict?
Link copied to clipboard
open override val mainTab: Tab?

The main tab of the browser.

Link copied to clipboard
open override val stopped: Boolean

Checks if the browser process has stopped.

Link copied to clipboard
open override val tabs: List<Tab>

A list of all tabs in the browser.

Link copied to clipboard
open override val targets: MutableList<Connection>

A list of targets currently open in the browser.

Link copied to clipboard
open override val websocketUrl: String

The WebSocket URL for the browser's debugger.

Functions

Link copied to clipboard
open suspend override fun cleanupTemporaryProfile()
Link copied to clipboard
open suspend override fun get(url: String, newTab: Boolean, newWindow: Boolean): Tab

Top level get. Uses the first tab to retrieve given url.

Link copied to clipboard
open suspend override fun start(): Browser

Launches the actual browser

Link copied to clipboard
open suspend override fun stop()

Stops the browser process and cleans up resources.

Link copied to clipboard
open suspend override fun testConnection(): Boolean

Tests the connection to the browser by sending a request to the "version" endpoint.

Link copied to clipboard
open suspend override fun updateTargets()

Updates the list of targets in the browser.

Link copied to clipboard
open suspend override fun wait(timeout: Long): Browser

Waits for the specified time in seconds.