openLink

suspend fun openLink(uri: String, anyApp: Boolean = false, timeout: Duration = device.timeouts.lifecycle): String?(source)

Opens uri (a deep link or app link, e.g. myapp://orders/42 or https://example.com/x) with an ACTION_VIEW intent restricted to this package, so no chooser or browser can take it; pass anyApp = true to let Android resolve it like a tap on a link elsewhere would. Returns the activity Android reported starting (package/.Activity) when it reported one. Nothing about the screen is checked: wait for what the link should show.