Can someone provide some code examples for using WebView.InvokeScriptAsync
I am successfully using simple code like
Dim scriptString As String = "document.getElementsByName('submit')[0].click()"
Await WebView1.InvokeScriptAsync("eval", {scriptString})
However, I would like to be able to write more sofisticated code like the one below that I used in my old VB projects using Internet Explorer referencing the Microsoft HTML Object Library:
Public WithEvents Wbe As New SHDocVw.InternetExplorer
HTMLDoc = Wbe.Document
iHTMLCol = HTMLDoc.getElementsByTagName("input")
For Each iHTMLEle In iHTMLCol
If Not iHTMLEle.getAttribute("name") Is Nothing Then
If iHTMLEle.getAttribute("name").ToString = "sort" Then
iHTMLEle.setAttribute("value", "1234")
Exit For
End If
End If
Next
I guess it is just a matter of the writing what I call above the scriptString. But some actual code examples will be helpful