goto

suspend fun PageSession.goto(url: String, configure: GotoConfigBuilder.() -> Unit = {})(source)

Navigates the current page to the provided url, and suspends until the configured completion events are fired. By default, this function suspends until the GotoCompletionEvent.Load event is fired.

The completion events and the navigation request can be configured via the configure parameter.

This function throws NavigationFailed if the navigation response has an error, instead of waiting forever for an event that will never come.

If there is no failure, and yet the specified events never fire, this function may hang (there is no built-in timeout). You can use the coroutine's built-in withTimeout function if you need to stop waiting at some point.