newPage

suspend fun BrowserSession.newPage(configure: NewPageConfigBuilder.() -> Unit = {}): PageSession(source)

Creates a new page and attaches to it, then returns the new child PageSession. The underlying web socket connection of this BrowserSession is reused for the new child PageSession.

Use the configure parameter to further configure the properties of the new page.

By default, the new page is created in a new isolated browser context (think of it as incognito mode). This can be disabled via the configure parameter by setting NewPageConfigBuilder.incognito to false.