newBrowser

abstract fun newBrowser(): Browser

Creates a new Browser instance under this profile and navigates it to the "about:blank" web page within the defaultTimeout.

By default, the browser’s rendering mode matches this profile’s engine rendering mode configured in EngineOptions. To create a browser with a different mode, use newBrowser.

Return

a new Browser instance

Throws

if the engine failed to create a browser instance within the timeout

if the navigation to the "about:blank" has failed

if the profile is deleted or its engine is closed


abstract fun newBrowser(renderingMode: RenderingMode): Browser

Creates a new Browser instance under this profile and navigates it to the "about:blank" web page within the defaultTimeout with the given renderingMode.

Return

a new Browser instance

Since

9.0.0

Parameters

renderingMode

the rendering mode that indicates how the Browser instance will render the content of the web pages

Throws

when the engine failed to create a browser instance within the timeout

when the navigation to the "about:blank" has failed

when the engine is already closed