How do I capture text from a HTML element given its id=”” from a WebView2 in VB.NET?

You have wrong event handler signature here: Private Async Function WebView2_NavigationCompletedAsync( sender As Object, e As CoreWebView2NavigationCompletedEventArgs) _ As Task Handles WebView21.NavigationCompleted ‘ … End Function an event handler is a Sub/void not a Function and does not return any value of any type. The correct signature is: Private Sub WebView2_NavigationCompletedAsync( sender As Object, e … Read more